[jasspa] insert-date (format: 01-Oct-99)
- I use the following to insert a date, because I like the format 01-Oct-99:
insert-string &add 0 &mid $time 9 1 ; make space into '0'
insert-string &mid $time 10 1
insert-string &mid "JanFebMarAprMayJunJulAugSepOctNovDec" &add 0 &mul 3 &sub &mid $time 7 2 1 3 ; MMM
insert-string &mid $time 2 2 ; YY
!emacro ; insert-date
global-bind-key insert-date "esc @"
Note that it's easier to work with $time than the output of ascii-time, since dates are always two characters in $time. (One of them is often a space, but at least that's better than everything after it in the string sliding around.)
(Jasspa authors note: the help file says ascii-time is defined in misc.emf, and it's really in utils.)