[Newbies] working with dates
mathk.sue at gmail.com
Tue Dec 12 12:48:47 UTC 2006
Have a look at #yyyymmdd
And the test:
assert: date mmddyyyy = '6/2/1973';
assert: date yyyymmdd = '1973-06-02';
assert: (date printFormat: #(3 1 2 $! 2 1 1)) = '1973!2!Jun'.
2006/12/12, Kel Graham <kel at orawia.com>:
> I'd like to see how to control the formatting and storage of dates. I'm in
> the UK so would like to store my dates in yyyy-mm-dd format, but display
> them as dd-mm-yyyy; or as '12 December 2006' sometimes as well. I've looked
> at the Date class, but apart from the printFormat: method (which I can't see
> an explanation of the format) I can't see any easy way of ensuring that
> squeak converts my dd-mm-yyyy input into a nice ISO yyyy-mm-dd format.
> Could anyone suggest some classes/code to look at?
> Thanks very much,
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
More information about the Beginners