Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isHolidays returns the last date instead of a list #164

Closed
westn opened this issue Jul 21, 2020 · 0 comments · Fixed by #196
Closed

isHolidays returns the last date instead of a list #164

westn opened this issue Jul 21, 2020 · 0 comments · Fixed by #196

Comments

@westn
Copy link
Contributor

westn commented Jul 21, 2020

Problem:
On the swedish locale (SE), there's mothers day and pentecost occuring on the same date in 2020, see snippet taken from holidays.getHolidays('2020') below.

 {
    date: '2020-05-31 00:00:00',
    start: 2020-05-30T22:00:00.000Z,
    end: 2020-05-31T22:00:00.000Z,
    name: 'Pingst',
    type: 'public',
    rule: 'easter 49'
  },
  {
    date: '2020-05-31 00:00:00',
    start: 2020-05-30T22:00:00.000Z,
    end: 2020-05-31T22:00:00.000Z,
    name: 'Mors dag',
    type: 'observance',
    rule: 'sunday before 06-01'
  },

holidays.isHoliday(new Date('2020-05-31 00:00:00')) returns the snippet below.

{
  date: '2020-05-31 00:00:00',
  start: 2020-05-30T22:00:00.000Z,
  end: 2020-05-31T22:00:00.000Z,
  name: 'Mors dag',
  type: 'observance'
}

Expected behaviour: Return a list of holidays.

Research:

  • Does this affect more locales?
  • Is this an expected behaviour or broken?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant