Revision [761]

Last edited on 2010-06-20 01:28:22 by AdminSkyld [Improving explanation]
Additions:
The markers in the format are substituted with the correct time values and the entire formatted time is returned. All markers are one letter with a preceding percent sign (i.e. ##%H##). Anything that is given in the input format that does not follow this format is treated as a literal and ignored. Literals will, however, be returned in the result. For instance, ##%H:%M## will return a value like ##00:00## including the literal ##:## character.
Some of the supported conversion markers are listed as follows:
Deletions:
The markers in the format are substituted with the correct time values and the entire formatted time is returned. Some of the supported conversion markers are listed as follows:


Revision [760]

Edited on 2010-06-20 01:25:53 by AdminSkyld [Adding examples]
Additions:
You can use ##formattimestring## as follows:
%%function onCreated()
{
echo(formattimestring("%d/%M/%Y %H:%M", 1276989159));
}%%
… which would echo "19/12/2010 23:12" (bearing in mind that ##1276989159## was the value of ##[[timevar2]]## at the given time).
%%function onCreated()
{
echo(formattimestring("%d/%M/%Y %H:%M", timevar2));
}%%
… would output the current date and time in the same format as the above example.
Deletions:
& **TODO:** Insert an example.


Revision [759]

Edited on 2010-06-20 01:18:23 by AdminSkyld [Added table of markers]
Additions:
The markers in the format are substituted with the correct time values and the entire formatted time is returned. Some of the supported conversion markers are listed as follows:
|=|Marker|=|Description||
||%a||Abbreviated weekday name (like ##Mon##)||
||%A||Full weekday name (like ##Monday##)||
||%b||Abbreviated month name (like ##Jan##)||
||%B||Full month name (like ##January##)||
||%C||Century number represented as two digit number||
||%d||Day of the month represented as a number (from ##01## to ##31##)||
||%H||Hour represented as a decimal number using a 24-hour clock (from ##0## to ##23##)||
||%I||Hour represented as a decimal number using a 12-hour clock (from ##1## to ##12##)||
||%j||Day of the year represented as a number||
||%m||Month of the year represented as a number||
||%M||Minute of the hour represented as a number||
||%p||Either ##AM## or ##PM## (midnight is ##AM## and midday is ##PM##)||
||%S||Seconds of the minute represented as a number||
||%u||Day of the week represented as a number (from ##1## to ##7## where Monday is ##1##)||
||%U||Week of the year represented as a number (from ##1## to ##53##)||
||%w||Day of the week represented as a number (from ##0## to ##6## where Monday is ##0##)||
||%y||Year represented as a number without the century (from ##00## to ##99##)||
||%Y||Year represented as a number including the century||
||%z||Timezone as offset from GMT||
The full list is available in the [[http://linux.die.net/man/3/strftime Linux Manual]] (##man strftime##).
Deletions:
The markers in the format are substituted with the correct time values and the entire formatted time is returned.
& **TODO:** Insert a list of valid format markers here in a table (the same as ##strftime##).


Revision [758]

The oldest known version of this page was created on 2010-06-20 00:59:08 by AdminSkyld [Added page]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki