getDateTime 1.1 (internationalization: currently English, French, German, Spanish, and Dutch)
getDateTime 1.01 (fix a problem with extra blank space before day 1 to 9)
getDateTime 1.0 (first public release)
getDateTime.gp is a replacement for Karl Heinz Kremer's getModTime.gp. It let a
user define a format for the modification time and/or date of the source file
and insert it into the output file. getDateTime.gp provides internationalization
for the following languages: English, French, Dutch, German, and Spanish.
|Compatible Genpage Versions|
getDateTime( aPath[, aFormat[, aLanguage]] )
Available masks for format are:
- aPath is the path of the content file
- aFormat is the format in which the modification date and/or time of
the content file must appear.
- aLanguage is the code corresponding to the chosen language.
WD : WeekDay (ex: Wed for Wednesday)
LWD : Long WeekDay (ex: Wednesday)
DD : Day (ex: 29 as in September the 29th)
MM : Month (ex: Sep for September)
SM : Short Month (ex: 9 for September)
LM : Long Month (ex: September)
YYYY: Year (ex: 1999)
YY : Year (ex: 99)
hh : hour (ex: 16 for 4pm)
mm : minutes (ex: 14)
ss : secs (ex: 17)
Available language codes are:
EN for English (default)
FR for French (Franšais)
NL for Dutch (Nederlands)
DE for German (Deutsch)
ES for Spanish (Espa˝ol)
Firstly, include the getDateTime.gp recipe by calling <-- _GP_
recipe("$root/include/getDateTime.gp") --> somewhere in the content,
that can be either in one of the content files or in the template file.
Every time the getDateTime($inputfile, aFormat, aLanguage) statement is found, genpage will
format the modification date and/or time of the source file and insert it into
the generated file.
Here are some possible formats:
"WD MM DD hh:mm:ss YYYY"
|| Wed Sep 29 16:14:17 1999 (default format)|
|"Last Modified on LWD LM DD, YYYY"
||Last Modified on Wednesday September 29, 1999
|"Dernière modification le LWD DD LM YYYY", "FR"
||Dernière modification le mercredi 29 septembre 1999
Add support for new languages
No bugs known yet.
This page generated using Genpage - Version: 1.0.7 on Wed Aug 15 15:23:30 2001
© David Massart
Thanks to originator of stolen code: Karl Heinz Kremer