stack

Home > @infiniteobjects/core-library-node > Dates

Dates class

Utilities to interact with dates.

Signature:

export declare class Dates 

Methods

Method Modifiers Description
addDaysToDate(date, days, bussiness) static Adds days to a given date.
endOfDay(date) static Gets the last second of the day for given date.
endOfMonth(date) static Gets the last day of the month for the given date.
format(date, dateFormat) static Formats a date to a given format.
getLastDay() static Gets the previews day.
getLastMonth() static Gets the previews month.
isAfter(date, dateToCompare) static Checks if the given date is after compared to another date
parse(date) static Parses a date string to a Date object.
startOfDay(date) static Gets the first second of the day for given date.
startOfMonth(date) static Gets the first day of the month for the given date.
zonedTimeToUtc(date, timezone) static Given a date and any time zone, returns a Date with the equivalent UTC time.