Template:Sortdate
Description[edit source]
This template is designed to simplify the process of inserting dates into sorted tables.
Syntax[edit source]
{{sortdate | [Optional] Date string as used in PHP's strtotime() [http://php.net/manual/en/function.strtotime.php] | [Optional] Formatting string as used in PHP dates [http://php.net/date] }}
Example[edit source]
Date | Day | Present |
---|---|---|
5-Jan-08 | 12 | twelve drummers drumming |
4-Jan-08 | 11 | eleven pipers piping |
3-Jan-08 | 10 | ten lords a-leaping |
2-Jan-08 | 9 | nine ladies dancing |
1-Jan-08 | 8 | eight maids a-milking |
31-Dec-07 | 7 | seven swans a-swimming |
30-Dec-07 | 6 | six geese a-laying |
29-Dec-07 | 5 | five golden rings |
28-Dec-07 | 4 | four calling birds |
27-Dec-07 | 3 | three french hens |
26-Dec-07 | 2 | two turtle doves |
25-Dec-07 | 1 | a partridge in a pear tree |
Notes[edit source]
This template works by inserting hidden text equivalent to the ISO 8601 timestamp (yyyy-mm-dd hh:mm:ss) prior to the formatted text string.
The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer. Before PHP 5.1.0 this range was limited from 01-01-1970 to 19-01-2038 on some systems (e.g. Windows).