Skip to content

ZokugunKS/lang.date

Repository files navigation

kaoscript License NPM Version Dependency Status Build Status CircleCI Coverage Status

Extends the built-in Date class to work only on the UTC timezone.

The weeks are defined by the ISO 8601.

Getting Started

In Node.js

With node previously installed:

npm install @zokugun/lang.date

Use it with kaoscript:

import '@zokugun/lang.date'

const d = Date.tomorrow()

Functions

  • create()
  • getTime()
  • isTime()
  • today()
  • tomorrow()
  • yesterday()

Methods

  • add()
  • clone()
  • difference()
  • endOf()
  • equals()
  • format()
  • future()
  • futureOrPresent()
  • getEpochTime()
  • getDayOfMonth()
  • getDayOfWeek()
  • getDayOfYear()
  • getDaysInMonth()
  • getDaysInYear()
  • getWeek()
  • getWeeksInYear()
  • getYearOfWeek()
  • isAfter()
  • isBefore()
  • isBetween()
  • isLeapYear()
  • midnight()
  • noon()
  • past()
  • pastOrPresent()
  • rewind()
  • set()
  • setDayOfMonth()
  • setDayOfWeek()
  • setDayOfYear()
  • setWeek()
  • startOf()

License

MIT © Baptiste Augrain