~kosova/+junk/tuxfamily-twiki

« back to all changes in this revision

Viewing changes to foswiki/data/System/VarGMTIME.txt

  • Committer: James Michael DuPont
  • Date: 2009-07-18 19:58:49 UTC
  • Revision ID: jamesmikedupont@gmail.com-20090718195849-vgbmaht2ys791uo2
added foswiki

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%META:TOPICINFO{author="ProjectContributor" date="1231502400" format="1.1" version="1"}%
 
2
%META:TOPICPARENT{name="Macros"}%
 
3
#VarGMTIME
 
4
---+++ GMTIME{"format"} -- formatted GM time
 
5
   * Syntax: =%<nop>GMTIME%= OR =%<nop>GMTIME{"format"}%=
 
6
   * =%<nop>GMTIME%= uses the default date format defined by the {DefaultDateFormat} setting in [[%SCRIPTURLPATH{"configure"}%][configure]]
 
7
      * expands to %GMTIME%
 
8
   * Supported special format tokens:
 
9
     | *Token:* | *Unit:* | *Example* |
 
10
     | =$seconds= | seconds | 59 |
 
11
     | =$minutes= | minutes | 59 |
 
12
     | =$hours= | hours | 23 |
 
13
     | =$day= | day of month | 31 |
 
14
     | =$wday= | day of the Week (Sun, Mon, Tue, Wed, Thu, Fri, Sat) | Thu |
 
15
     | =$dow= | day of the week (Sun = 0) | 2  |
 
16
     | =$week= | number of week in year (ISO 8601) | 34 |
 
17
     | =$month= | short name of month | Dec |
 
18
     | =$mo= | 2 digit month | 12 |
 
19
     | =$year= | 4 digit year | 1999 |
 
20
     | =$ye= | 2 digit year | 99 |
 
21
     | =$tz= | either "GMT" (if set to gmtime), or "Local" (if set to servertime) | GMT |
 
22
     | =$iso= | ISO format timestamp | %GMTIME{"$iso"}% |
 
23
     | =$rcs= | RCS format timestamp | %GMTIME{"$rcs"}% |
 
24
     | =$http= | E-mail & http format timestamp | %GMTIME{"$http"}% |
 
25
     | =$epoch= | Number of seconds since 00:00 on 1st January, 1970 | %GMTIME{"$epoch"}% |
 
26
   * Tokens can be shortened to 3 characters
 
27
   * Example: =%<nop>GMTIME{"$day $month, $year - $hour:$min:$sec"}%= expands to =%GMTIME{"$day $month, $year - $hour:$min:$sec"}%=
 
28
   * %X% When used in a template topic, this macro will be expanded when the template is used to create a new topic. See TemplateTopics#TemplateTopicsVars for details.
 
29
   * Related: [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarGMTIME][GMTIME]], [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarREVINFO][REVINFO]], [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarSERVERTIME][SERVERTIME]]