Skip to content

Rehashing negative years #5

@johanbaaij

Description

@johanbaaij

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions