Skip to content

Valid DateTime treated as invalid #1065

@nirvdrum

Description

@nirvdrum

In JRuby 1.7.5 dev, DateTime.new(0) raises an ArgumentError and indicates it is an invalid date. This same invocation works fine in JRuby 1.7.4 and MRI 2.0.0-p247. My guess is the Joda-Time changes that made their way into 1.7.5 recently are the cause.

I can work around this in my app for now, but it seems an exception shouldn't be raised. As for a use case, I use this (clearly old) date is used as a null object for sorting operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions