Pre 1900 Date problems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Pre 1900 Date problems

Rob Rothwell
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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Pre 1900 Date problems

Yoshiki Ohshima-2
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
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Pre 1900 Date problems

Rob Rothwell
On Fri, Sep 5, 2008 at 6:48 PM, Yoshiki Ohshima <[hidden email]> 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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners