Thanks to visit codestin.com
Credit goes to github.com

Skip to content

parse with format mmm yyyy fails #36

@Rauskii

Description

@Rauskii

When trying to parse a string 'Feb 2019', using
Timeliness.parse('Feb 2019', format: 'mmm yyyy')
it returns nil, if the current date is something that does not exist.
For example I was trying to parse above Feb 2019 string on 29th day of July, and parsing it apparently fails as there is no 29th day in february 2019.
Same issue might happen when trying to parse lets say 'April yyyy' during 31st day of some month.
Could the 'mmm yyyy' format parsing default to first day of the month instead of returning nil on these rare cases?

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