Calendar date
A calendar date is a reference to a particular day represented within a calendar system. The calendar date allows the specific day to be identified. The number of days between two dates may be calculated. For example, "24 " is ten days after "14 " in the Gregorian calendar. The date of a particular event depends on the observed time zone. For example, the air attack on Pearl Harbor that began at 7:48 a.m. Hawaiian time on 7 December 1941 took place at 3:18 a.m. Japan Standard Time, 8 December in Japan.
A particular day may be represented by a different date in another calendar as in the Gregorian calendar and the Julian calendar, which have been used simultaneously in different places. In most calendar systems, the date consists of three parts: the day of the month, the month, and the year. There may also be additional parts, such as the day of the week. Years are usually counted from a particular starting point, usually called the epoch, with era referring to the particular period of time.
The most widely used epoch is a conventional birthdate of Jesus. A date without the year may also be referred to as a date or calendar date. As such, it defines the day of an annual event, such as a birthday on 31 May, holiday on 1 September, or Christmas on 25 December.
Many computer systems internally store points in time in Unix time format or some other system time format.
The date command—internally using the C date and time functions—can be used to convert that internal representation of a point in time
to most of the date representations shown here.
The current date in the Gregorian calendar is. If this is not really the current date, then to update it.
Usage map
Date format
There is a large variety of formats for dates in use, which differ in the order of date components. These variations use the sample date of 31 May 2006:, component separators, whether leading zeros are included, whether all four digits of the year are written, and whether the month is represented in Arabic or Roman numerals or by name .Gregorian, day–month–year (DMY)
This little-endian sequence is used by a majority of the world and is the preferred form by the United Nations when writing the full date format in official documents. This date format originates from the custom of writing the date as "the Nth day of in the year of our Lord " in Western religious and legal documents. The format has shortened over time but the order of the elements has remained constant. The following examples use the date of 9 November 2006.- "9 November 2006" or "9. November 2006"
- 9/11/2006, 09.11.2006, or 9-11-2006
- 09-Nov-2006
- 09Nov06 – Used, including in the U.S., where space needs to be saved by skipping punctuation.
- 9th November 2006 – 'The' and 'of' are often spoken but generally omitted in all but the most formal writing such as legal documents.
- 09/Nov/2006 – used in the Common Log Format
- Thursday, 9 November 2006
- 9/xi/06, 9.xi.06, 9-xi.06, 9/xi-06, or 9.XI.2006 – This is usually confined to handwriting only and is not put into any form of print. It is associated with a number of schools and universities. It has also been used by the Vatican as an alternative to using months named after Roman deities. It is used on Canadian postmarks as a bilingual form of the month. It was also commonly used in the Soviet Union, in both handwriting and print.
- 9 November 2006 CE or 9 November 2006 AD
Gregorian, year–month–day (YMD)
Examples for the 9th of November 2003:
- 2003-11-09: the standard Internet date/time format, a profile of the international standard ISO 8601, orders the components of a date like this, and additionally uses leading zeros, for example, 1996-05-01, to be easily read and sorted by computers. It is used with UTC in RFC 3339. This format is also favoured in certain Asian countries, mainly East Asian countries, as well as in some European countries. The big-endian convention is also frequently used in Canada, but all three conventions are used there.
- 2003 November 9
- 2003Nov9
- 2003Nov09
- 2003-Nov-9
- 2003-Nov-09
- 2003-Nov-9, Sunday
- 2003. 9. – The official format in Hungary, point after year and day, month name with small initial. Following shorter formats also can be used: 2003.. 9., 2003. 11. 9., 2003. XI. 9.
- 2003.11.9 using dots and no leading zeros, common in China.
- 2003.11.09
- 2003/11/09 using slashes and leading zeros, common in Internet in Japan.
- 20031109 : the "basic format" profile of ISO 8601, an 8-digit number providing monotonic date codes, common in computing and increasingly used in dated computer file names. It is used in the standard iCalendar file format defined in RFC 5545. A big advantage of the ISO 8601 "basic format" is that a simple textual sort is equivalent to a sort by date.
Gregorian, month–day–year (MDY)
This sequence is used primarily in the Philippines and the United States. This date format was commonly used alongside the little-endian form in the United Kingdom until the mid-20th century and can be found in both defunct and modern print media such as the London Gazette and The Times, respectively. This format was also commonly used by many English-language print media in many former British colonies and also one of two formats commonly used in India during British Raj era until mid-20th century. In the United States, it is said as Sunday, November 9, for example, although usage of "the" isn't uncommon.- Thursday, November 9, 2006
- November 9, 2006
- Nov. 9, 2006 or 11/9/2006
- 11-9-2006, 11.9.2006, 11.09.06, or 11/09/06, or 20060911
Gregorian, year–day–month (YDM)
This date format is used in Kazakhstan, Latvia, Nepal, and Turkmenistan. According to the official rules of documenting dates by governmental authorities, the date format in Kazakh is written as YYYY.DD.MM, e.g. 2006.05.04 or 2006 5 April.Standards
There are several standards that specify date formats:- ISO 8601 Data elements and interchange formats – Information interchange – Representation of dates and times specifies YYYY-MM-DD, where all values are fixed length numeric, but also allows YYYY-DDD, where DDD is the ordinal number of the day within the year, e.g. 2001-365.
- RFC 3339 Date and Time on the Internet: Timestamps specifies YYYY-MM-DD, i.e. a particular subset of the options allowed by ISO 8601.
- RFC 5322 Internet Message Format specifies day month year where day is one or two digits, month is a three letter month abbreviation, and year is four digits.
Usage overloading
For example, "07/08/06" could refer to either 7 August 2006 or July 8, 2006, or 6 August 2007. In the United States, dates are rarely written in purely numerical forms in formal writing, although they are very common elsewhere; when numerical forms are used, the month appears first. In the United Kingdom, while it is regarded as acceptable albeit less common to write month-name day, year, this order is never used when written numerically. However, as an exception, the American shorthand "9/11" is widely understood as referring to the 11 September 2001 terrorist attacks.
When numbers are used to represent months, a significant amount of confusion can arise from the ambiguity of a date order; especially when the numbers representing the day, month, or year are low, it can be impossible to tell which order is being used. This can be clarified by using four digits to represent years, and naming the month; for example, "Feb" instead of "02". The ISO 8601 date order with four-digit years: YYYY-MM-DD, is specifically chosen to be unambiguous. The ISO 8601 standard also has the advantage of being language independent and is therefore useful when there may be no language context and a universal application is desired. Many Internet sites use YYYY-MM-DD, and those using other conventions often use -MMM- for the month to further clarify and avoid ambiguity.
In addition, the International Organization for Standardization considers its ISO 8601 standard to make sense from a logical perspective. Mixed units, for example feet and inches, or pounds and ounces, are normally written with the largest unit first, in decreasing order. Numbers are also written in that order, so the digits of 2006 indicate, in order, the millennium, the century within the millennium, the decade within the century, and the year within the decade. The only date order that is consistent with these well-established conventions is year–month–day. A plain text list of dates with this format can be easily sorted by file managers, word processors, spreadsheets, and other software tools with built-in sorting functions. Some database systems use an eight-digit YYYYMMDD representation to handle date values. Naming folders with YYYY-MM-DD at the beginning allows them to be listed in date order when sorting by name – especially useful for organising document libraries.
An early U.S. Federal Information Processing Standard recommended 2-digit years. This is now widely recognized as extremely problematic, because of the year 2000 problem. Some U.S. government agencies now use ISO 8601 with 4-digit years.
When transitioning from one date notation to another, people often write both styles; for example Old Style and New Style dates in the transition from the Julian to the Gregorian calendar.
Advantages for ordering in sequence
One of the advantages of using the ISO 8601 date format is that the lexicographical order of the representations is equivalent to the chronological order of the dates, assuming that all dates are in the same time zone. Thus dates can be sorted using simple string comparison algorithms, and indeed by any left to right collation. For example:1998-02-28 sorts before
2006-03-01 which sorts before
2015-01-30
The YYYY-MM-DD layout is the only common format that can provide this. Sorting other date representations involves some parsing of the date strings. This also works when a time in 24-hour format is included after the date, as long as all times are understood to be in the same time zone.
ISO 8601 is used widely where concise, human readable yet easily computable and unambiguous dates are required, although many applications store dates internally as UNIX time and only convert to ISO 8601 for display. It is worth noting that all modern computer Operating Systems retain date information of files outside of their titles, allowing the user to choose which format they prefer and have them sorted thus, irrespective of the files' names.
Specialized usage
Day and year only
The U.S. military sometimes uses a system, which they call "Julian date format" that indicates the year and the actual day out of the 365 days of the year. For example, "11 December 1999" can be written in some contexts as "1999345" or "99345", for the 345th day of 1999. This system is most often used in US military logistics, since it makes the process of calculating estimated shipping and arrival dates easier. For example: say a tank engine takes an estimated 35 days to ship by sea from the US to South Korea. If the engine is sent on 06104, it should arrive on 06139. Note that outside of the US military and some US government agencies, including the Internal Revenue Service, this format is usually referred to as "ordinal date", rather than "Julian date".Such ordinal date formats are also used by many computer programs. Using a three-digit Julian day number saves one byte of computer storage over a two-digit month plus two-digit day, for example, "January 17" is 017 in Julian versus 0117 in month–day format. OS/390 or its successor, z/OS, display dates in yy.ddd format for most operations.
UNIX time stores time as a number in seconds since the beginning of the UNIX Epoch.
Another "ordinal" date system is in common use in astronomical calculations and referencing and uses the same name as this "logistics" system. The continuity of representation of period regardless of the time of year being considered is highly useful to both groups of specialists. The astronomers describe their system as also being a "Julian date" system.
Week number used
Companies in Europe often use year, week number, and day for planning purposes.So, for example, an event in a project can happen on w43 or w43-1 or, if the year needs to be indicated, on w0643 or w643.
The ISO does present a standard for identifying weeks, but as it does not match up with the Gregorian calendar, this standard is somewhat more problematic than the other standards for dates.
Expressing dates in spoken English
In English-language outside North America, full dates are written as 7 December 1941 and spoken as "the seventh of December, nineteen forty-one", with the occasional usage of December 7, 1941. In common with most continental European usage, however, all-numeric dates are invariably ordered dd/mm/yyyy.In Canada and the United States, the usual written form is December 7, 1941, spoken as "December seventh, nineteen forty-one" or colloquially "December the seventh, nineteen forty-one". Ordinal numerals, however, are not always used when writing and pronouncing dates, and "December seven, nineteen forty-one" is also an accepted pronunciation of the date written December 7, 1941. A notable exception to this rule is the Fourth of July.