Splus and year 2000

Don MacQueen (macq@llnl.gov)
Thu, 29 Jan 1998 07:24:26 -0800


Can someone tell me if version 4 does any better than this?

Version 3.4, unix:

> dates('1/9/2000',format='m/d/y')
[1] 01/09/100
# obviously unsatisfactory

> dates('1/9/2000',format='m/d/y',out.format='m/d/yy')
[1] Jan/09/2000
# correct, but I'd prefer to see 01/09/2000

> dates('1/9/2000',format='m/d/y',out.format='m/d/yyyy')
[1] Jan/09/2000
# I would have expected to get 01/09/2000

> dates('1/9/2000',format='m/d/y',out.format='m/d/year')
[1] Jan/09/2000

The help page says that using words (eg, 'year' 'mon') instead of letters
('y' 'm') causes the month and year to be written out fully, rather than as
two digit numbers. Evidently, repeated letters are interpreted as words.

(Mathsoft should take a look at how MS Excel does this sort of thing. It's
much more flexible, and would better serve the customers, in my opinion.)

Thanks
-Don