All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
npm
, "This package does not have a README. Add a README to your package so that users know how to get started."
All methods are accessible via Date
object.
import "datility";
console.log(new Date(2022, 5, 3).addDays(1)); // => Sat Jun 04 2022 00:00:00 GMT+0300 (GMT+03:00)
Also, can import methods from the specified category:
import "datility";
import "datility/manipulate";
import "datility/manipulate/add";
import "datility/manipulate/subtract";
import "datility/manipulate/reference";
import "datility/comparison";
import "datility/working-days";
addDays(days: number): Date
addWeeks(weeks: number): Date
addMonths(months: number): Date
addYears(years: number): Date
subtractDays(days: number): Date
subtractWeeks(weeks: number): Date
subtractMonths(months: number): Date
subtractYears(years: number): Date
isBefore(given: Date): boolean
isSame(given: Date): boolean
isAfter(given: Date): boolean
isSameOrBefore(given: Date): boolean
isSameOrAfter(given: Date): boolean
isBetween(start: Date, end: Date): boolean
isPast(given?: Date): boolean
isFuture(given?: Date): boolean
isDay(dayName: DayName): boolean