%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. Without setting the date explicitly, uses the current time and date. | %DATETIME{"$wday"}% |
language="..." |
Optionally localize the output. Supported languages are: English, Portuguese, Dutch. Overrides the LANGUAGE preference (which is currently set to: en ). |
%DATETIME{"$wday" language="pt"}% |
date="..." |
Before formatting, set the 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. Seconds since 1970 (UNIX time) 1218930300 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"}% |
timezoneoffset="..." |
Increase the date by any number of hours (may be a negative number). Overrides the default value in configure. | %DATETIME{date="31 Dec 2001" format="$seconds" timezoneoffset="20"}% |
format
. DateTimePlugin supports the following additional parameters:
Parameter | Description | Example |
---|---|---|
$month_long |
The long name of the month. | July |
$wday_long |
The long name of the day of the week. | Wednesday |
LANGUAGE
to your language of choice, or use the DATETIME
parameter language
.
Parameter | Description | Example |
---|---|---|
$month with language="..." |
The localized short name of the month. | Out |
$month_long with language="..." |
The localized long name of the month. | Outubro |
$wday with language="..." |
The localized short name of the day of the week. | Seg |
$wday_long with language="..." |
The localized long name of the day of the week. | Segunda-feira |
Deprecated parameter | Explanation | Suggestion |
---|---|---|
$i_month |
The localized short name of the month. | Use $month with a language="..." setting. |
$i_lmonth |
The localized long name of the month. | Use $month_long with a language="..." setting. |
$lmonth |
The English long name of the month. | Use $month_long with a language="en" setting. |
$i_wday |
The localized short name of the day of the week. | Use $wday with a language="..." setting. |
$i_lwday |
The localized long name of the day of the week. | Use $wday_long with a language="..." setting. |
$lwday |
The English long name of the day of the week. | Use $wday_long with a language="en" setting. |
$sec |
Undocumented notation for seconds. | Use $seconds . |
$min |
Undocumented notation for minutes. | Use $minutes . |
$hour |
Undocumented notation for hours. | Use $hours . |
$day2 |
Undocumented notation for day. | Use $day . |
$seconds |
$seconds |
$minutes |
$minutes |
$hours |
$hours |
$day |
$day |
$wday |
$wday |
$wday_long |
$wday_long |
$dow |
$dow |
$week |
$week |
$month |
$month |
$month_long |
$month_long |
$mo |
$mo |
$year |
$year |
$ye |
$ye |
$tz |
$tz |
$iso |
$iso |
$rcs |
$rcs |
$http |
$http |
$epoch |
$epoch |
Yesterday was %DATETIME{"$day $month $year" incdays="-1"}%
results in:
Yesterday was %DATETIME{"$lwday, $day $month $year" incdays="-1"}%
One week from now is %DATETIME{"$wday, $day $month $year" incdays="7"}%
results in:
One week from now is %DATETIME{"$wday, $day $month $year" incdays="7"}%
%DATETIME{ "Create TODO topic for tomorrow: [[ToDo$year$mo$day]] ($lwday, $day $lmonth)" incdays="1" }%results in: %DATETIME{ "Create TODO topic for tomorrow: ToDo$year$mo$day ($lwday, $day $lmonth)" incdays="1" }%
{DateTimePlugin}
.
{DateTimePlugin}{Debug}
to 1.
configure
, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.
Plugin Author: | TWiki:Main.AurelioAHeckert (2004), Foswiki:Main.ArthurClemens (2008, 2009) |
Version: | 4740 |
Release: | 1.2 |
Change History: | |
31 Aug 2009 | 1.2 Arthur Clemens New features: • Added format parameter $epoch to pass seconds since 1970 (UNIX time). • Added parameter language . • Added parameter timezoneoffset . • Changed the 'localized' formatting parameters; now use language="..." to localize output. • Made configuration of localized strings in configure more coherent. • Completed unit test coverage. Bug fixes: • Fixed 'bug' in timezone offset that intentionally only uses the configure setting {TimezoneOffset} with current dates. To use a timezone offset with a set date, add parameter timezoneoffset . |
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 |
Support: | http://foswiki.org/Support/DateTimePlugin |
Author | TWiki:Main.AurelioAHeckert (2004), Foswiki:Main.ArthurClemens (2008, 2009) |
Version | 4740 |
Release | 1.2 |
Copyright | TWiki:Main.AurelioAHeckert (2004), Foswiki:Main.ArthurClemens (2008, 2009) |
License | GPL 2 or later (GNU General Public License |
Home | http://foswiki.org/Extensions/DateTimePlugin |
Support | http://foswiki.org/Support/DateTimePlugin |
Repository | https://github.com/foswiki/DateTimePlugin |
ExtensionClassification | Information structuring and Search |
ExtensionType | PluginPackage |
Compatibility | Foswiki 1.2.0 or earlier |
ImageUrl | |
DemoUrl | http:// |
SupportUrl | DateTimePlugin |
ModificationPolicy | PleaseFeelFreeToModify |
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
md5 | DateTimePlugin.md5 | manage | 165 bytes | 01 Sep 2009 - 23:09 | ArthurClemens | |
sha1 | DateTimePlugin.sha1 | manage | 189 bytes | 01 Sep 2009 - 23:09 | ArthurClemens | |
tgz | DateTimePlugin.tgz | manage | 8 K | 01 Sep 2009 - 23:09 | ArthurClemens | |
zip | DateTimePlugin.zip | manage | 10 K | 01 Sep 2009 - 23:08 | ArthurClemens | |
EXT | DateTimePlugin_installer | manage | 4 K | 01 Sep 2009 - 23:09 | ArthurClemens |