|
Insert date
[Back]
New (Y2K and ISO 8601):
This version gives date which is Y2K (if your version of date supports
%Y) and ISO 8601 (i.e. date format is yyyy-mm-dd, e.g. 1999-10-17
for today)
d=shell_command("date +\"%Y-%m-%d\"", "")
insert_string(substring(d, 0, length(d)-1))
Change 19%y to 20%y to get dates in the 21st
century.
d=shell_command("date +\"%h %d 19%y\"", "")
insert_string(substring(d, 0, length(d)-1))
The substring call removes the newline character.
If your version of date supports %Y you can use this to
get a Y2K date (i.e. year in 4 digits):
d=shell_command("date +\"%h %d %Y\"", "")
insert_string(substring(d, 0, length(d)-1))
[Back]
Released on Wed, 21 Nov 2001
by
C. Denat
|
|