Time measurements and units of measure. See also my sections on JavaScript Date object, Microsoft Time Functions, My About#Dates.

## Units

Thankfully most modern systems agree upon the second as the unit of time.

• s = second. The second is the only official SI unit of time: 'The second is the duration of 9 192 631 770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state [0 K] of the cesium 133 atom.' [http://physics.nist.gov/cuu/Units/second.html]. Beyond the second, units of time are language and context dependent.
• min = minute = 60 s.
• h = hour = 60 min = 3,600 s.
• d = day = 24 h = 1,440 min = 86,400 s.
• mo = month = 28 to 31 d = 672 to 744 h = 40,320 to 44,640 min=  2,419,200 to 26,78,400 s.
• y = year = a = annum = 12 mo
• 365.00 d = 8,760 h = 525,600 min = 31,536,000 s.
• 365.25 d = 8,766 h = 525,960 min = 31,557,600 s.
• 366.00 d = 8,784 h = 527,040 min = 31,622,400 s.
• Also these variants: Ka/KY/TY, Ma/MY, Ga/GY/BY.
• Relative years are often used:
• YA, KYA/TYA, MYA, GYA/BYA. "years ago"
• BP, BP/TBP, MBP. BP (aka "before present" or "before physics") is used in radiocarbon dating with the "present" referring to 1950.
• BC (before Christ) = BCE (before common era)
• AD (Anno Domini = Year of our Lord) = CE (common era)

Here is a metric set. Note that "metric min", "metric h", "metric d", and "metric y" are hardly ever used.

• s = second. The second is the only official SI unit of time.
• metric min = 100 s ~ 1.67 min.
• Ks = 1,000 s.
• metric h = 100 metric min = 10,000 s ~1.67 h.
• metric d = 10 metric h = 1,000 metric min = 100,000 s ~ 1.1574 d.
• Ms = 1,000,000 s ~ 11.6 d.
• metric y = 1,000 metric d = 10,000 metric h = 1,000,000 metric min = 100,000,000 s ~ 3.1688 y.
• Gs = 1,000,000,000 s ~ 31.688 y.
• Ts = 1,000,000,000,000 s ~ 31,688 y.

## Translate Time

Given a date, the form below returns the date in various formats. So far my code only works for Microsoft Internet Explorer. [2004-08-17: I updated my code to work according to the W3C DOM so it works on browsers like MSIE and Mozilla.]

Date-Time to translate

Enter a date-time in a format accepted by JavaScript. EGs:

• Mon, 25 Dec 1995 13:30:00 GMT. The TZDs (Time Zone Designators) accepted are : UT|GMT|UTC|Z, EST|EDT|R, CST|CDT|S, MST|MDT|T, PST|PDT|U,  other military single letter TZDs, ±HHMM, ±HH, ±H. [2004-10-01: Apparently Mozilla's JS does not accept the military single letter TZDs.]
• Dec 25, 1995. Defaults to 00:00:00 local time.
• 12/25/1995 2:00 PM. Note that 2 digit years are assumed to be in the 1900s. Variations such as P.M., pm, and p.m. are also accepted.

Local Time Z Time
. .
. .
. .
. .

## Time Formatting

You may also want to see my section on Microsoft Time Functions.

### IS0 8601

ISO 8601 [1988], in my opinion, is more elegant than RFC 822. Here are the basics of ISO 8601.

DATESCalendar date. CC               EG: 19 (19th century) CCYY             EG: 1997
CCYY-MM          EG: 1997-07
CCYY-MM-DD       EG: 1997-07-16
Ordinal week of year & ordinal day of week.
CCYY-WWW         EG: 1997-W29 (29th week of 1997). W01 is always 1st week with a Thu.
CCYY-WWW-D       EG: 1997-W29-3 (3rd day of the 29th week). 1st day is always Mon.
Ordinal day of year.
CCYY-DDD         EG: 1997-198 (198th day of 1997). Watch for leap years.
TIMES
hh               EG: 19 (19th hour or 7 p.m. local time)
hh.h             EG: 19.35 hh:mm            EG: 19:21
hh:mm.m          EG: 19:21.5
hh:mm:ss         EG: 19:21:30
hh:mm:ss.s     EG: 19:21:30.4537
hh:mm:ss.sTZD    EG: 19:21:30.4537+01:00 or 18:21:30.4537Z Any of the time options may have a TZD.

A date and a time may be concatenated with a t. EG: 1997-07-16t18:21:30.4537Z.

The standard has is case-insensitive for all the literal letters used. That is T, P, R, W, Y, M, D, H, and S can be substituted with t, p, r, w, y, m, d, h, and s. I prefer to use  upper case M for month and lower case m for minutes. I also prefer the lower case t to the upper case T because it is easier to see visually and because a lower case t has a tradition of usage as the variable for time.

It is allowable to remove the separating hyphens and colons. EG: 19970716t192130.4537+0100 is "Basic Format" according to the standard, while 1997-07-16t19:21:30.4537+01:00 is considered "Extended Format". The Basic Format is not as human readable but it is useful programmatically and in situations where you want to save space and/or avoid those characters, especially in the case of file or directory names.

Dates and times may be truncated with an implied date portion that's signified with a single dash (-). Sufficient context is of course required. It is safer and easier to avoid implied date portions, esp. if the date may be taken out of context.

• EG: Assume the context is 1997-07-16t18:21:30.4537Z.
• 97-07-16 implies 1997-07-16, i.e. implied century but no truncation mark is used.
• -97-07 implies 1997-07, i.e. implied century.
• -97 implies 1997, i.e. implied century.
• --07-16 implies 1997-07-16, i.e. implied century & year.
• --07 implies 1997-07, i.e. implied century & year.
• ---16 implies 1997-07-16, i.e. implied century, year, & month
• EG: Assume the context is 1997-W29-3.
• 97-W29-3 implies 1997-W29-3, i.e. implied century.
• 97-W29 implies 1997-W29, i.e. implied century.
• -7-W29-3 implies 1997-W29-3, i.e. implied century & decade.
• -7-W29 implies 1997-W29, i.e. implied century & decade.
• -W29-3 implies 1997-W29-3, i.e. implied century, decade, & year.
• -W29 implies 1997-W29, i.e. implied century, decade, & year.
• -W-3 implies 1997-W39-3, i.e. implied century, decade, year, & week.
• EG: Assume the context is 1997-198.
• 97-198 implies 1997-198, i.e. implied century.
• -198 implies 1997-198, i.e. implied century, decade, & year.
• EG: Assume the context is 18:21:30.4537Z.
• -21 implies 18:21, i.e. implied hour.
• --30 implies 18:21:30, i.e. implied hour & minute.

BCE (or B.C.) years can be indicated with a negative sign. EG: -1500-07 is July 1500 BCE. Years of greater magnitude can also use more than 4 digits. EG: -600000 is 600,000 BCE.

The following examples indicate the same point in time (ignoring daylight savings time).

12:00Z = 13:00+01:00 = 13:00 CET (Central European Time)
12:00Z = 07:00-05:00 = 07:00 EST (Eastern Standard Time)
1995-02-04t24:00 = 1995-02-05T00:00

Periods of time or time intervals are done 4 different ways:

• Period with a specific start and stop point. Syntax is (startTime/stopTime). EGs:
1998-05-12/15                  time interval within a month
1998-05-12t14:15Z/15t16:00Z    time interval within a month and specific times
1998-05-12t14:15Z/16:00Z       time interval within a day
• Period with a duration but no specific start or stop point. Syntax is Pduration. EGs:
P1Y2M3Dt4h5m6s        time duration of 1 year, 2 months, 3 days, 4 hours, 5 minutes, and 6 seconds
P0001-02-03t04:05:06  same as above
P00010203t040506      same as above
P1W                   time duration of 1 week
P0Y0M0Dt40h0m0s       time duration of 40 hours
P40h                  same as above
• Period with a specific start and a duration. Syntax is startTime/Pduration. EG:
1998-05-12t14:15Z/P0001-01-02
• Period with a duration and stop point. Syntax is Pduration/stopTime.EG:
P1Y2M3D/1998-05-12t14:15Z

Recurring periods of time or recurring time intervals are expressed like the 4 ways of expressing non-repeating periods of time except that they start with R/ (to repeat forever) or Rn/ (to indicate how many times the interval repeats). EGs: These examples repeat 3 times.

R3/1998-05-12/15
R3/P1Y2M3D  (R/P1Y would recur annually forever)
R3/1998-05-12t14:15Z/P0001-02-03
R3/P1Y2M3D/1998-05-12t14:15Z

ISO 8601 is vastly superior for many reasons. Here are a few:

• It is human and machine readable.
• Increase machine readability by removing the special characters like "-" and ":".
• Sort ISO 8601 formatted dates without any modification.
• Databases often accept ISO 8601. EG: Microsoft SQL Server 2005 takes this format: yyyy-mm-ddThh:mm:ss[.mmm], regardless of the SET DATEFORMAT or SET LANGUAGE settings.

### RFC 822

RFC 822 [1982] is the original standard for ARPA Internet text message (including email). RFC 822 was updated with RFC 1123 [1989] for 4 digit years. Here are the basics of RFC 822 copied right out of the RFC.

date-time   =  [ day "," ] date time          ; dd mm yy
; hh:mm:ss zzz

day         =  "Mon"  / "Tue" /  "Wed"  / "Thu" /  "Fri"  / "Sat" /  "Sun"

date        =  1*2DIGIT month 2*4DIGIT        ; day month year
; EG: 20 Jun 82

month       =  "Jan"  /  "Feb" /  "Mar"  /  "Apr"
/  "May"  /  "Jun" /  "Jul"  /  "Aug"
/  "Sep"  /  "Oct" /  "Nov"  /  "Dec"

time        =  hour zone                         ; ANSI and Military

hour        =  2DIGIT ":" 2DIGIT [":" 2DIGIT]    ; 00:00:00 - 23:59:59

zone        =  "UT"  / "GMT"                ; Universal Time
; North American : UT
/  "EST" / "EDT"                ;  Eastern:  - 5/ - 4
/  "CST" / "CDT"                ;  Central:  - 6/ - 5
/  "MST" / "MDT"                ;  Mountain: - 7/ - 6
/  "PST" / "PDT"                ;  Pacific:  - 8/ - 7
/  1ALPHA                      ; Military: Z = UT;
;  A:-1; (J not used)
;  M:-12; N:+1; Y:+12
/ ( ("+" / "-") 4DIGIT )        ; Local differential
;  hours+min. (HHMM)

EGs:

Mon, 25 Dec 1995 13:30:00 GMT
Mon
5 Dec 95
13:30:00 Z

While RFC 822 is a nice little standard, it is not used much outside of the Internet. In contrast ISO 8601 is broadly used and is comparable to the formatting already used by the Chinese and astronomers.

## Miscellany

• American Time. The contiguous US states should be in one or two time zones at the most. Here's why:
• China is in one time zone although geographically it spans 5 time zones.
• US companies would save billions of dollars since they wouldn't have to pay for extra staff to work earlier or later to cover three other US time zones.
• Saturday Night Live and the Super Bowl could be broadcast live at a reasonable hour.
• DST (Daylight Saving Time, aka Summer Time) ("spring forward, fall back").
• Most of North America uses DST. During the summer, U.S. time zones are +01:00. EG: The Central Time Zone (S) is Central Standard Time (CST) -06:00 (12:00S = 18:00Z) but during the summer is Central Daylight Time (CDT) -05:00 (12:00S = 17:00Z).
• On the first Sunday in April, at 02:00 LST (Local Standard Time), clocks are adjusted forward to 03:00 LST.
• Because of the idiotic Energy Policy Act of 2005 by George W. Bush, as of 2007-03-11, this will be done on the second Sunday in March.
• On the last Sunday in October, at 02:00 LST, clocks are adjusted backward to 01:00 LST.
• Because of the idiotic Energy Policy Act of 2005 by George W. Bush, as of 2007-03-11, this will be done on the first Sunday in November.
• Personally, I feel DST should be abolished. I prefer a gradual shift in daylight instead of a sudden one --and so do babies, domestic animals, hospitalized patients, etc. At the very least Chicago should stop using daylight savings because it has an international airport. StandardTime.com has a proposal to end U.S. DST and to have the U.S. with only 2 time zones.
• UTC (Coordinated Universal Time, Universal Time Coordinated, Universal Coordinated Time, Universal Time) is the standard time common to every place in the world. Formerly and still widely called GMT (Greenwich Mean Time) and also World Time and WET (Western European Time), UTC nominally reflects the mean solar time along the Earth's prime meridian.
• The prime meridian is 0° longitude in the 360 lines of longitude on Earth. There are 179 meridians toward the East and 179 toward the West. The 180th meridian mostly coincides with the official International Date Line. Cross the IDL going west and the date advances 1 day; conversely cross the IDL going east and the date goes back 1 day. The prime meridian is arbitrarily based on the meridian that runs through the old Royal Astronomical Observatory in Greenwich, England, just outside of London, where the present system originated.
• The word meridian used to mean "noon" as derived from the Latin meri and diem, i.e. "middle" and "day". Thus ante meridian meant "before noon" hence "a.m.". Similarly, post meridian mean "after noon", hence "p.m.".
• The UTC is based on an atomic clock to which adjustments of a second (called a leap second) are sometimes made to allow for variations in the solar cycle.
• Coordinated Universal Time is expressed using a 24-hour clock but can be converted into a 12-hour clock (AM and PM). UTC is used in plane and ship navigation, where it also sometimes known as Z (Zulu). UTC uses the Gregorian calendar.
• UTC was defined by the CCIR (International Radio Consultative Committee), a predecessor organization of the ITU-TS, and is maintained by the BIPM (Bureau International des Poids et Mesures).

Coordinated Universal Time (UTC) follows TAI (see below) exactly except for an integral number of seconds, presently 32. These leap seconds are inserted on the advice of the International Earth Rotation Service (IERS) to ensure that, on average over the years, the Sun is overhead within 0.9 seconds of 12:00:00 UTC on the meridian of Greenwich. UTC is thus the modern successor of Greenwich Mean Time, GMT, which was used when the unit of time was the mean solar day.

International Atomic Time (TAI) is calculated by the BIPM from the readings of more than 200 atomic clocks located in metrology institutes and observatories in more than 30 countries around the world. TAI is made available every month in the BIPM Circular T. We estimate that TAI does not lose or gain with respect to an imaginary perfect clock by more than about one tenth of a microsecond (0.000 000 1 second) per year.

• Integer Time Zones. "There are 25 integer World Time Zones from -12 through 0 (GMT) to +12. Each one is 15° of Longitude as measured East and West from the Prime Meridian of the World at Greenwich, England. Some countries have adopted non-standard time zones, usually 30 minutes offset which have a * designation. Each Time Zone is measured relative to Greenwich, England. There are both civilian designations which are typically three letter abbreviations (EG: CST) for most time zones. In addition there are military designations. These use each letter of the alphabet (except 'J' which is used for local time) and are known by their phonetic equivalent. E.G. Greenwich Mean Time (civilian) or Z = Zulu (military and aviation)." [Ref very good]
 0 1 2 3 4 5 6 7 8 9 10 11 12 A CET B EET C BT D E E*India F G H CCT/Phil I JST K ACS L GST M IDLE Z N WAT O P Q AST R EST S CST T MST U PST V YST W AHST X Y IDLW
• 'The second is the duration of 9 192 631 770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium-133 atom [at rest at a temperature of 0 K].' -Ref [bipm.fr/en/si/si_brochure/chapter2/2-1/second.html]. See also Second [W].
• According to the 2005-06 issue of the National Geographic:
• 4 GYA: Earth day < 10 hours.
• 400 MYA:
• Earth day = 22 hours
• Earth year = 400 days
• Tidal friction (the gravitational forces between the Earth and the Moon) slows Earth days by 20 seconds every MY.
• The Julian calendar [W] (aka Old Style = OS) was introduced in -0046. The Gregorian calendar [W] (aka New Style = NS) was decreed by Pope Gregory XIII in 1582-02-24. Officially, the last day of the Julian calendar was 1582-10-04 Thursday, followed by the first day of the Gregorian calendar, 1582-10-15 Friday, a 10 day difference. By 1800 there was an 11 day differences, by 1900 12 days, and by 2100 there will be a 13 day difference. There was, of course, some struggle in the transition. EG: Britain did not officially convert until 1752-09-14.