[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: times, dates, images, and S-W



> >   [regarding] conventions for time and date representations [as
> >   discussed by] John Hodges & Bob
> >   [...]
> >   [methods] I currently use for representing dates:
> >   [...]
> >       (2) as year followed by two digit number of month followed by
> >	   two digit day of the month as in
> >	       900806  or 19900806
>                ^^^^^^
> 
> WARNING: This method will break badly in just 10 years. Is 010202
> 01 February 2002, 01 February 1902, 02 February 2001 or 02 Febraury 1901?

It's February 2, of either 1901 or 2001.  In normal circumstances the
context makes it pretty obvious which is meant; to be precise, prepend
the 19 or the 20.  Your other interpretations make no sense at all
under this scheme; they're the British interpretations of 01/02/02.

I've been using the yymmdd scheme for years.  A friend of mine
showed it to me, and I found it very convenient, and began using it
(on my own private papers and files; it's not worth the effort to make
other people learn to read my dates).

A big advantage is that numerical sorts work just fine.

Another advantage is that it doesn't favor either American-style dates
(mm/dd/yy) or British-style dates (dd/mm/yy), it's more logical than
either, and it can be equally easily explained to members of both
groups.

Yes, the method will break in ten years, but it won't break badly.  It
will sort into two chunks, one before the century mark, and one after.
A single IF statement can take care of this.  For anything spanning
more than one century break, you would of course use all four digits
of the year anyway.

> YOU have a convention of yymmdd, but there is nothing which makes
> that obviously better than ddmmyy. Which you are using is only obvious
> in those years when yy>31.

What?  You've misunderstood something, but I'm not sure just what.  I
think you're assuming that people are going to start mixing the three
kinds of dates, and leaving out the "/" or "-" separators when they
use British or American dates.  Both are improbable.

Personally, I'd find it more legible to write today's date as 90 08 31
instead of 900831, but only slightly.  Anyway, it bugs me that so many
programming languages that can't cope with spaces in numbers; Fortran
does still retain some (albeit very few) advantages.

-- Dave Matuszek (dave@prc.unisys.com)
-- Unisys Corp. / Paoli Research Center / PO Box 517 / Paoli PA  19301
-- Any resemblance between my opinions and those of my employer is improbable.
< You can put a mouse on an IBM.  And you can put a radio on a motorcycle. >