Yet another (type-safe) date time library.
$ npm install holy-time
OR
$ yarn add holy-time
import HolyTime from 'holy-time'
HolyTime
.in(4, 'days')
.add(2, 'weeks')
.subtract(4, 'minutes')
.isWeekend()
HolyTime
.between(
HolyTime.add(HolyTime.startOf('day'), 2, 'hours'),
HolyTime.now()
)
.in('hours')
HolyTime.max(1666224000000, HolyTime.next('year'))
new HolyTime('2022-10-20')
.isAfter(
HolyTime.subtract(
HolyTime.in(4, 'days'),
8, 'weeks'
)
)
HolyTime
.duration(2, 'hours')
.add(30, 'minutes')
.in('seconds')