The @AGEDATE
,
@DATECONV
,
@DATEPLUS
,
@EASTER
,
@FILESTAMP
,
@HOLIDAY
,
@INLIEU
,
@MAKEDATE
,
@NEXTDATE
,
@NEXTDOW
, and
@PICKDATE
functions
can return dates in any of these formats:
fmt | Format | Example |
0 | local date format | varies; 11/04/08 in the U.S. |
1 | mm/dd/yy | 11/04/08 |
2 | dd/mm/yy | 04/11/08 |
3 | yy/mm/dd | 08/11/04 |
4 | ISO 8601 | 2008-11-04 |
5 | ISO 8601 week-day | 2008-W45-2 |
6 | ISO 8601 ordinal date | 2008-309 |
16 | MS-DOS day number | +10535 |
17 | using English words | Tuesday, November 4, 2008 |
18 | T format (offset from today’s date) | |
19 | ANSI day number | A+148962 |
20 | ISO8601, packed | 20081104 |
21 | days since 1970-01-01 | U+14187 |
32 | Windows user locale “long date” format | varies; mardi 4 novembre 2008 in France |
256 | local date format, four-digit year | varies; 11/04/2008 in the U.S. |
257 | mm/dd/yyyy | 11/04/2008 |
258 | dd/mm/yyyy | 04/11/2008 |
259 | yyyy/mm/dd | 2008/11/04 |
Formats 0 through 3 return two-digit years, for compatibility with Take Command’s native behavior. Where compatibility is not an issue, I recommend using formats 256-259 instead. These formats are equivalent to 0-3, but return four-digit years. (A note in TakeCmd.h suggests that TCC supports similar formats internally; unfortunately, this capability doesn’t seem to be available to the user.)
The LONGYEARS
command can be used to display four-digit years in formats 0-3, making them
functionally identical to formats 256-259.
MS-DOS day numbers are based on January 1, 1980 as day 0; dates before 1980 will have negative MS-DOS day numbers. ANSI day numbers use January 1, 1601 as day 1.
Note that all of these output formats except for #17 and #32 are also valid input formats.