From 6a7d14e24c864ef54ea68d82119378313937aeb8 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 4 Apr 2005 04:55:33 +0000 Subject: [PATCH] document all date codes and defaults --- lib/WebGUI/i18n/English/D_date.pm | 32 ++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/lib/WebGUI/i18n/English/D_date.pm b/lib/WebGUI/i18n/English/D_date.pm index 63e6ac34f..5d6de6f29 100644 --- a/lib/WebGUI/i18n/English/D_date.pm +++ b/lib/WebGUI/i18n/English/D_date.pm @@ -10,18 +10,44 @@ our $I18N = { 'date body' => { message => q| -^D; or ^D(); - Date
+^D();
+^D([date formatting code],[epoch date]);
The current date and time.

You can configure the date by using date formatting symbols. For instance, if you created a macro like this ^D("%c %D, %y"); it would output September 26, 2001. The following are the available date formatting symbols:

-
%%%
%y4 digit year
%Y2 digit year
%m2 digit month
%Mvariable digit month
%cmonth name
%d2 digit day of month
%Dvariable digit day of month
%wday of week name
%h2 digit base 12 hour
%Hvariable digit base 12 hour
%j2 digit base 24 hour
%Jvariable digit base 24 hour
%plower case am/pm
%Pupper case AM/PM
%zuser preference date format
%Zuser preference time format
+ + + + + + + + + + + + + + + + + + + + + + + + +
%%A literal percent sign '%'
%cThe calendar month name.
%CThe calendar month name abbreviated to 3 characters and represented in English.
%dA two digit day.
%DA variable digit day.
%hA two digit hour (on a 12 hour clock).
%HA variable digit hour (on a 12 hour clock).
%jA two digit hour (on a 24 hour clock).
%JA variable digit hour (on a 24 hour clock).
%mA two digit month.
%MA variable digit month.
%nA two digit minute.
%oOffset from local time represented as an integer.
%OOffset from GMT represented in four digit form with a sign. Example: -0600
%pA lower-case am/pm.
%PAn upper-case AM/PM.
%sA two digit second.
%wDay of the week.
%WDay of the week abbreviated to 3 characters and represented in English.
%yA four digit year.
%YA two digit year.
%zThe current user's date format preference, (default: '%H:%n %p').
%ZThe current user's time format preference, (default: '%M/%D/%y')
+

+The default format code is %z %Z.

You can also pass in an epoch date into this macro as a secondary parameter. If no date is specified then today's date and time will be used. - |, lastUpdated => 1112466919, },