Variable Operators :: Date Operators
On the subject of formatting, variable operators aren't just for security; they're there to give you even more options. There are operators to adjust the look of numbers and these are used by time/date variables. By default ComicCMS strips any leading 0s (e.g. 04 comes out as 4) and you can use operators to stop that:
| Operator | Outcome |
|---|---|
| {{comic_day}} | Will strip any 0s and come out as a number between 1 and 31 |
| {{comic_day:pad}} | Will keep leading 0s and come out as a number between 01 and 31 |
Those operators work on all {{*_day}}, {{*_weekday}} and {{*_month}} variables. There are other special operators that only work on certain date variables:
| Operator | Outcome |
|---|---|
| {{*_year:pad}} | Will display year with 4 digits instead of 2 |
| {{*_weekday:name}} | Will return the name of the weekday instead of the number |
| {{*_weekday:shortname}} | Will return the short name of the weekday (usualy 3 chars, depending on your language) |
| {{*_month:name}} | Will return the name of the month instead of the number |
| {{*_month:shortname}} | Will return the short name of the month (usualy 3 chars, depending on your language) |
|
{{*_timestamp:short_date}} {{*_timestamp:short_both}} {{*_timestamp:long_both}} {{*_timestamp:cur_time}} {{*_timestamp:time}} | Will return a time/date formatted depending on your language. These may vary depending on your language pack |