%DATETIME{incdays="5"}% and will have a always coherent phrase.
%DATETIME{}% to show the current date and time in default date format (as set in configure).
For more options use: %DATETIME{"format" <optional parameters>}%
| Parameter | Description | Example |
|---|---|---|
"..." or format="..." |
Format of date string; see GMTIME{"format"} for formatting variables | %DATETIME{"$wday"}% |
date="..." |
Any date in one of the following formats: Default Foswiki format 31 Dec 2001 - 23:59 Foswiki format without time (defaults to 00:00) 31 Dec 2001 Date seperated by '/', '.' or '-', time with '.' or ':' Date and time separated by ' ', '.' and/or '-' 2001/12/31 23:59:59 2001.12.31.23.59.59 2001/12/31 23:59 2001.12.31.23.59 2001-12-31 23:59 2001-12-31 - 23:59 ISO format 2001-12-31T23:59:59 ISO dates may have a timezone specifier, either Z or a signed difference in hh:mm format. For example: 2001-12-31T23:59:59+01:00 2001-12-31T23:59Z The local timezone will be assumed. Note: will not handle dates before 1970! |
%DATETIME{date="2001/12/31"}% |
incdays="..." |
Increase the date by any number of days (may be a negative number) | %DATETIME{date="31 Dec 2001" incdays="1"}% |
inchours="..." |
Increase the date by any number of hours (may be a negative number) | %DATETIME{date="31 Dec 2001 - 07:00" format="$hours" inchours="-1"}% |
incminutes="..." |
Increase the date by any number of minutes (may be a negative number) | %DATETIME{date="31 Dec 2001" format="$minutes" incminutes="15"}% |
incseconds="..." |
Increase the date by any number of seconds (may be a negative number) | %DATETIME{date="31 Dec 2001" format="$seconds" incseconds="20"}% |
format. DateTimePlugin supports the following additional paramters:
| Parameter | Description | Example |
|---|---|---|
$i_month |
The localized short name of the month. | Ago |
$lmonth |
The English long name of the month. | July |
$i_lmonth |
The localized long name of the month. | Julho |
$i_wday |
The summarized internationalized name of the day of the week. | Qua |
$lwday |
The English long name of the day of the week. | Wednesday |
$i_lwday |
The localized long name of the day of the week. | Quarta-feira |
$seconds |
08 |
$minutes |
42 |
$hours |
06 |
$day |
22 |
$wday |
Tue |
$i_wday |
Tue |
$i_lwday |
Tuesday |
$dow |
2 |
$week |
21 |
$month |
May |
$mo |
05 |
$i_month |
May |
$i_lmonth |
May |
$year |
2012 |
$ye |
12 |
$tz |
GMT |
$iso |
2012-05-22T06:42Z |
$rcs |
2012/05/22 06:42:08 |
$http |
Tue, 22 May 2012 06:42:08 GMT |
$epoch |
1337668928 |
Yesterday was %DATETIME{"$day $month $year" incdays="-1"}%
results in:
Yesterday was Monday, 21 May 2012
One week from now is %DATETIME{"$wday, $day $month $year" incdays="7"}%
results in:
One week from now is Tue, 29 May 2012
%DATETIME{
"Create TODO topic for tomorrow: [[ToDo$year$mo$day]] ($lwday, $day $lmonth)"
incdays="1"
}%
results in:
Create TODO topic for tomorrow: ToDo20120523 (Wednesday, 23 May)
%<plugin>_<setting>%, i.e. %DATETIMEPLUGIN_SHORTDESCRIPTION%
{DateTimePlugin}.
{DateTimePlugin}{Debug} to 1.
DateTimePlugin.zip in your Foswiki installation directory.
| Plugin Author: | TWiki:Main.AurelioAHeckert (2004), Foswiki:Main.ArthurClemens (2008, 2009) |
| Plugin Version: | 1.1 (11 Mar 2009) |
| Change History: | |
| 11 Mar 2009 | 1.1 Foswiki release |
| 28 Feb 2008 | 1.0 Arthur Clemens: Major rewrite to make this plugin compatible with (and use from) TWiki::Time. Localized language strings are now read from configure. |
| 27 Jul 2004 | 0.90 Aurelio A Heckert: First release |
| CPAN Dependencies: | none |
| Other Dependencies: | none |
| Perl Version: | 5.005 |
| License: | GPL (GNU General Public License) |
| Plugin Home: | http://foswiki.org/Extensions/DateTimePlugin |
| Feedback: | http://foswiki.org/Extensions/DateTimePluginDev |
Copyright © by the contributing authors. All material on this site is the property of the contributing authors.