[lug] MEAS Data file format

Kevin King kevin at precisonline.com
Wed Aug 16 21:51:36 MDT 2000


>Lastly I must 'fess up to a personal procedure ( I hope that it does
>not count as bigotry :) that I adopted years ago; it does totally
>ignore "furriners" who do not speak some form of English.  I always
>write the month, usually just three letters.  The point is that if
you
>write the month, it seems that nobody gets it wrong.  For some
reason,
>or set of reasons, the year and the day are not muddled.  4 JUL 00 =
>JUL 4, 00 to every(english-speaking)body.

This response is first to Tom, who stated:

>YYYY-DD-MM isn't a date format that is actually used anywhere.

That's a pretty wide statement.  Having spent the last seven years
doing systems in a variety of non-US countries, including many ESL
countries, I'd recommend caution in taking such a wide swath.

Having said that, I have noticed a trend in non-US countries to use
the format you mention above, slightly modified.  The actual format I
have seen is:

dd mmm yyyy

where dd is always a two digit year, mm is always a three character
month (locale adjusted), and yyyy is always a 4-digit year.  This is,
of course, only an external representation; the best representation
for storing dates (as far as my experience goes) is using an unsigned
int, counting elapsed days since a given date.  The problem that I've
seen is that systems calculate the date based on the time, which has
its place, but it's not always and it's not never.  Counting the date
separate from the time gives a much higher threshold than counting
seconds and converting it to a date.

>If you accept the rule that months are always alphabetic and days
and
>years are always numeric you can accept a lot of variation by
parsing
>even with regular expressions.

True.  The real issue is locale-adjusting the input.  Still, it's not
a significant issue if you know the language or have resources who
do.

--Kevin
kevin at precisonline.com
http://www.precisonline.com
http://www.precisonline.com/gold.htm






More information about the LUG mailing list