Rob Rothwell | 5 Sep 23:52

Pre 1900 Date problems

How do I reference dates prior to 1900 in Squeak?

When I print, for instance d := Date fromString: '01/01/1800', I get 1 January 3700.

1700 = 3600,

etc...

Should I be using a different Date/TimeStamp package for this sort of thing?

Thanks,

Rob
_______________________________________________
Beginners mailing list
Beginners <at> lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Yoshiki Ohshima | 6 Sep 00:48

Re: Pre 1900 Date problems

At Fri, 5 Sep 2008 17:54:19 -0400,
Rob Rothwell wrote:
> 
> How do I reference dates prior to 1900 in Squeak?
> 
> When I print, for instance d := Date fromString: '01/01/1800', I get 1 January 3700.
> 
> 1700 = 3600,
> 
> etc...
> 
> Should I be using a different Date/TimeStamp package for this sort of thing?

  It is only #readFrom: is trying to be too helpful, but the system
itself can surely represent these earlier dates.

Date class>>year:month:day:

does the right thing.

-- Yoshiki
Rob Rothwell | 6 Sep 01:28

Re: Pre 1900 Date problems

On Fri, Sep 5, 2008 at 6:48 PM, Yoshiki Ohshima <yoshiki <at> vpri.org> wrote:
 It is only #readFrom: is trying to be too helpful, but the system
itself can surely represent these earlier dates.

Date class>>year:month:day:

does the right thing.

Ahh...you are right...thank you.  I'm converting those weird 5x5 Oracle numeric strings to dates!

Rob

_______________________________________________
Beginners mailing list
Beginners <at> lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Gmane