[comp.std.internat] All numeric representation of dates - ISO standards

devine@cookie.dec.com (Bob Devine) (09/02/88)

> What ISO standard exists for representation of time?
> Could some one please summarize the standard?

  There are 3 ISO relevant standards: 2014, 3307, and 4031.

ISO 2014 Writing of calendar dates in all-numeric form

  This says that when writing a date just using numbers,
the year is first and has 4 digits (though 2 digits can be use
if "no possible confusion can arise from the omission of the
century"), the month is next with 2 digits, and the day is
last with 2 digits.

  The example given in the standard is for July 1, 1976.
There are 3 legal representations:
    1. 19760701
    2. 1976-07-01
    3. 1976 07 01

ISO 3307 Representation of time of the day

  This one is complicated!  From the standard:

	"Local time of the day is defined as clock time in
	public use at the point of origin.  In the 24-hour
	timekeeping-system, local time of the day may be
	expressed by the following combinations of the
	time elements hours, minutes, and seconds:

	a) hours
	b) hours and decimal fraction of an hour
	c) hours and minutes
	d) hours, minutes and decimal fraction of a minute
	e) hours, minutes and seconds
	f) hours, minutes, seconds and decimal fraction of a second"

  So, one could choose what precision is needed and then use the
appropriate combination.  There is also the need to allow the
separators between the fields (there are colons, commas, periods,
or nothing depending on the fields).

ISO 4031 Representation of local time differentials 

  This uses the ISO 3307 standard as a base and adds a suffix
to identify the difference from UTC.  That is, it is time-of-day
plus +hhmm where the '+' could also be a '-' to indicate subtraction
and the hhmm is the time difference in hours and minutes from UTC.

  For example, here in the Mountain Time zone, the suffix of -0700
is used because we are west of the Greenwich Meridian.


You also might want to look at the working being done for OSI,
specifically the X.400 data types.  There are two types defined for
date-time that use the above ISO standards to compose a single
character string representation.  Both are restrictions on the
many different options (ie, dash or space or nothing) and provide
a method to encode the date-time with sufficient precision for
nearly every use.

Bob Devine
DEC Database Systems in Colorado Springs