partial-date icon indicating copy to clipboard operation
partial-date copied to clipboard

Rehashing negative years

Open johanbaaij opened this issue 9 years ago • 0 comments

Hi! I have a feeling that rehashing an integer made from an object with a negative year doesn't work the way it's supposed to or that I'm doing something wrong.

Say I do the following;

date = PartialDate::Date.new
date.year = -1999
date.value
# -19990000

So far so good. Except if I try to rehydrate this value...

date = PartialDate::Date.load -19990000
date.year
# -978943

Any ideas? Thanks!

johanbaaij avatar Jul 29 '16 08:07 johanbaaij