]> gitweb.factorcode.org Git - factor.git/blob - extra/time/time-docs.factor
Merge branch 'master' into experimental (untested!)
[factor.git] / extra / time / time-docs.factor
1
2 USING: help.syntax help.markup kernel prettyprint sequences strings ;
3
4 IN: time
5
6 HELP: strftime
7 { $values { "format-string" string } }
8 { $description "Writes the timestamp (specified on the stack) formatted according to the format string." } 
9 ;
10
11 ARTICLE: "strftime" "Formatted timestamps"
12 "The " { $vocab-link "time" } " vocabulary is used for formatted timestamps.\n"
13 { $subsection strftime }
14 "\n"
15 "Several format specifications exist for handling arguments of different types, and specifying attributes for the result string, including such things as maximum width, padding, and decimals.\n"
16 { $table
17     { "%a"     "Abbreviated weekday name." }
18     { "%A"     "Full weekday name." }
19     { "%b"     "Abbreviated month name." }
20     { "%B"     "Full month name." }
21     { "%c"     "Date and time representation." }
22     { "%d"     "Day of the month as a decimal number [01,31]." }
23     { "%H"     "Hour (24-hour clock) as a decimal number [00,23]." }
24     { "%I"     "Hour (12-hour clock) as a decimal number [01,12]." }
25     { "%j"     "Day of the year as a decimal number [001,366]." }
26     { "%m"     "Month as a decimal number [01,12]." }
27     { "%M"     "Minute as a decimal number [00,59]." }
28     { "%p"     "Either AM or PM." }
29     { "%S"     "Second as a decimal number [00,59]." }
30     { "%U"     "Week number of the year (Sunday as the first day of the week) as a decimal number [00,53]." }
31     { "%w"     "Weekday as a decimal number [0(Sunday),6]." }
32     { "%W"     "Week number of the year (Monday as the first day of the week) as a decimal number [00,53]." }
33     { "%x"     "Date representation." }
34     { "%X"     "Time representation." }
35     { "%y"     "Year without century as a decimal number [00,99]." }
36     { "%Y"     "Year with century as a decimal number." }
37     { "%Z"     "Time zone name (no characters if no time zone exists)." }
38     { "%%"     "A literal '%' character." }
39 } ;
40
41 ABOUT: "strftime"
42
43