A few of the functions in this plugin can return times in different formats. The tfmt parameter controls how times are returned. The lower four bits of tfmt select between 24-hour time or a variety of different 12-hour formats. If the lower four bits are all zero, then the time is returned in 24-hour format; if any is set, 12-hour format is used:
tfmt | tfmt | |||
0 | 5:23 | 7 | 5:23A.M. | |
1 | 5:23 AM | 8 | 5:23a.m. | |
2 | 5:23 am | 9 | 5:23 A | |
3 | 5:23 A.M. | 10 | 5:23 a | |
4 | 5:23 a.m. | 11 | 5:23A | |
5 | 5:23AM | 12 | 5:23a | |
6 | 5:23am |
You can also add the following values to tfmt:
value | meaning |
128 | include seconds |
256 | include milliseconds |
512 | use local time and decimal separators, not hardcoded : and . |
1024 | use leading zero in hours |
2048 | left-pad one-digit hours with a space |
4096 | omit time and decimal separators; use leading zero in hours |
5120 | omit time separators; use leading zero in hours |
There is also a special value 15, which reports a time as a decimal fraction of a day:
tfmt | |
15 | .22430556 |