Knowledge Base: Specifying Dates and Times

There are many different cultural conventions for specifying date and time.  Some of these are ambiguous.  For example, if somebody writes 4/5/18, a reader in the United States may read that as April 5th, 2018, while their colleague in the United Kingdom would interpret it as May 4th, 2018.   Their grandfathers may have read the year as 1918.

Enough.

There is an international standard (ISO 8601) for writing dates and time, and that’s what we use at Ratburger.org.  Now, when I say that it’s what “we” use, I mean only what the site employs when displaying dates and times.  In your own writings, you’re free to use anything you wish: visit my Calendar Converter and go wild—French Republican Calendar?  Mayan Calendar?  No problem!

But, if you want people to understand what you’ve written, it makes sense to adhere to adopted standards, and they’re simple and make a lot of sense.  To specify a date, write:

YYYY-MM-DD

where leading zeroes are used where necessary and the date is in Universal Time (UTC).  For example, to specify the date of the Apollo 11 Moon landing, you’d write:

1969-07-20

If you need to specify a time, for example for the Moon landing, use Universal time, as follows, according to ISO 8601:

1969-07-20T20:18:04Z

where the “T” denotes the time and “Z” indicates it’s in the “Zulu” (don’t ask) time zone or, UTC.

You’re welcome to use whatever convention you wish for date and time here, but the site will use ISO 8601 and UTC with adamantine persistence.  Why use ISO 8601?  It’s an international standard, and dates written that way are sufficiently unique they can’t be confused for other conventions.  They are independent of time zones and quaint notions such as summer and winter time.  A given date and time has the same meaning for anybody, everywhere on Earth.  If placed in a computer database and sorted lexically (by character order), they are automatically sorted in chronological order.  If you’d written “1969-7-20T20:18:4Z”, for example, it wouldn’t be sorted in order with other dates which had tens digits in the month and seconds fields.

If you really want something free of social construction, you’re free to use Julian Day numbers.

— John Walker, 2018-04-07T23:51:46Z  JD 2458216.494282407

10+

Users who have liked this post:

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar

Author: John Walker

Founder of Ratburger.org, Autodesk, Inc., and Marinchip Systems. Author of The Hacker's Diet. Creator of www.fourmilab.ch.

6 thoughts on “Knowledge Base: Specifying Dates and Times”

  1. Japan sometimes uses periods to separate things. Ex. 2018.04.08

    Is / the most common divider in the US? How about Europe?

    1+

    Users who have liked this comment:

    • avatar
  2. 10 Cents:
    Japan sometimes uses periods to separate things. Ex. 2018.04.08

    Is / the most common divider in the US? How about Europe?

    Europe traditionally has used DD.MM.YYYY, but I haven’t had any problems using ISO 8601 YYYY-MM-DD since before 2000.

    In ISO 8601 you can also omit the delimiters: 20180408, but nobody does this outside of computer database internal storage.

    1+

    Users who have liked this comment:

    • avatar
  3. Haakon Dahl:
    Personally, I use week numbers, with any day that feels like a Monday starting another week.

    This makes sense. You were always week at numbers, Haakon.

    3+

    Users who have liked this comment:

    • avatar
    • avatar
    • avatar
  4. If I need to include the date on a file on my computer, I use this convention but omit the delimiters. I didn’t know anything about ISO 8601. I just saw a client doing it a number of years ago and thought it was a good idea so I started doing it myself. Certainly makes it easier to keep files organized.

    I do appreciate knowing the background for it, so thanks. I try to encourage clients to use it, and often encounter resistance. Now I can say, “It is from ISO 8601.” We’ll see if this helps with compliance. 😉

    1+

    Users who have liked this comment:

    • avatar

Leave a Reply