Skip to content

assume date with 4 digits as year #7

Open
@dkuku

Description

@dkuku

I think that the shorter numbers should be parsed as year and can default to 1 January

iex [11:02 :: 2] > DateTimeParser.parse_date("2022")
{:ok, ~D[1905-07-14]}

Imo it's more likely that it's the current year than 1905.

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