Closed schwarmco closed 4 years ago
A holiday should be recognized on the whole day. The example snippet const nowIsHoliday = moment().isHoliday() in the README suggests, that this is also meant to be in the feature scope.
const nowIsHoliday = moment().isHoliday()
Example Code:
const moment = require('moment-feiertage') console.log(moment('2020-12-25 17:00').isHoliday()) // false console.log(moment('2020-12-25 00:00').isHoliday()) // 1. Weihnachtsfeiertag
A possible fix would probably be, to change https://github.com/DaniSchenk/moment-feiertage/blob/5f86fe50f87df87c31c0ff3e5e93de5b667a97ec/src/index.ts#L110 to
if (_moment.isSame(holidays[h].date, 'day')) {
Damn! That's critical. Thank you for reporting back. I provided a fix and updated tests. Missed that in my Typescript rewrite...
A holiday should be recognized on the whole day. The example snippet
const nowIsHoliday = moment().isHoliday()
in the README suggests, that this is also meant to be in the feature scope.Example Code:
A possible fix would probably be, to change https://github.com/DaniSchenk/moment-feiertage/blob/5f86fe50f87df87c31c0ff3e5e93de5b667a97ec/src/index.ts#L110 to