manpagez: man pages & more
info coreutils
Home | html | info | man

File: coreutils.info,  Node: Calendar date items,  Next: Time of day items,  Prev: General date syntax,  Up: Date input formats

29.2 Calendar date items
========================

A “calendar date item” specifies a day of the year.  It is specified
differently, depending on whether the month is specified numerically or
literally.  All these strings specify the same calendar date:

     2022-11-14     # ISO 8601.
     22-11-14       # Assume 19xx for 69 through 99,
                    # 20xx for 00 through 68 (not recommended).
     11/14/2022     # Common U.S. writing.
     14 November 2022
     14 Nov 2022    # Three-letter abbreviations always allowed.
     November 14, 2022
     14-nov-2022
     14nov2022

   The year can also be omitted.  In this case, the last specified year
is used, or the current year if none.  For example:

     11/14
     nov 14

   Here are the rules.

   For numeric months, the ISO 8601 format ‘YEAR-MONTH-DAY’ is allowed,
where YEAR is any positive number, MONTH is a number between 01 and 12,
and DAY is a number between 01 and 31.  A leading zero must be present
if a number is less than ten.  If YEAR is 68 or smaller, then 2000 is
added to it; otherwise, if YEAR is less than 100, then 1900 is added to
it.  The construct ‘MONTH/DAY/YEAR’, popular in the United States, is
accepted.  Also ‘MONTH/DAY’, omitting the year.

   Literal months may be spelled out in full: ‘January’, ‘February’,
‘March’, ‘April’, ‘May’, ‘June’, ‘July’, ‘August’, ‘September’,
‘October’, ‘November’ or ‘December’.  Literal months may be abbreviated
to their first three letters, possibly followed by an abbreviating dot.
It is also permitted to write ‘Sept’ instead of ‘September’.

   When months are written literally, the calendar date may be given as
any of the following:

     DAY MONTH YEAR
     DAY MONTH
     MONTH DAY YEAR
     DAY-MONTH-YEAR

   Or, omitting the year:

     MONTH DAY

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.