Dates
Date and time related utility functions.
today
Returns the actual date as a Date object. Source
Syntax:
today() : Date
Parameters: None
Returns: Date
Example:
import * as Dates from "./utils/Dates.js";
let today = Dates.today();
todayAsIsoString
Returns today's date as string formatted in the ISO format: 2020-11-27. Source
Syntax:
todayAsIsoString() : string
Parameters: None
Returns: String
Example:
import * as Dates from "./utils/Dates.js";
let today = Dates.todayAsIsoString();
yesterday
Returns yesterday's date as a Date object. Source
Syntax:
yesterday() : Date
Parameters: None
Returns: Date
Example:
import * as Dates from "./utils/Dates.js";
let yesterday = Dates.yesterday();
yesterdayAsIsoString
Returns yesterday's date as a string formatted in ISO format. 2020-11-27. Source
Syntax:
yesterdayAsIsoString() : string
Parameters: None
Returns: String
Example:
import * as Dates from "./utils/Dates.js";
let yesterday = Dates.yesterdayAsIsoString();
tomorrow
Returns tomorrow's date as a Date object. Source
Syntax:
tomorrow() : Date
Parameters: None
Returns: Date
Example:
import * as Dates from "./utils/Dates.js";
let tomorrow = Dates.tomorrow();
tomorrowAsIsoString
Returns tomorrow's date as a string formatted in ISO format. 2020-11-27. Source
Syntax:
tomorrowAsIsoString() : string
Parameters: None
Returns: String
Example:
import * as Dates from "./utils/Dates.js";
let tomorrow = Dates.tomorrowAsIsoString();
Last updated
Was this helpful?