Skip to content

'sunday next week' returns nil during certain dates #344

@havulinna

Description

@havulinna

Chronic.parse('sunday next week') appears to return nil when called during the current week. We have not noticed any issues while using it about a year now, but currently Chronic is not able to return sunday for next week.

Chronic.parse('sunday next week', now: Time.parse('2016-10-24 12:00:00 +0200')) # nil

I've tested it by experimenting different times as the now parameter. Calling the method with now set in the past or in the future works as expected:

Chronic.parse('sunday next week', now: Time.parse('2016-10-21 12:00:00 +0200')) # 2016-10-30 11:30:00 +0200
Chronic.parse('sunday next week', now: Time.parse('2016-11-01 12:00:00 +0200')) # 2016-11-13 12:00:00 +0200

I suspect the issue is related to daylight saving time, as our time zone will switch back to standard time on Sunday October 30th.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions