Skip to content

badosz0/holy-time

Repository files navigation

holyTime

Holy Time

License: MIT NPM version JSR version

Yet another (type-safe) date time library.

Installation

$ npm install holy-time

OR

$ yarn add holy-time

Resources

Examples

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')

About

Yet another (type-safe) date time library

Resources

License

Stars

Watchers

Forks

Packages

No packages published