The JavaScript snippet collection contains a wide variety of ES6 helper functions. It includes helpers for dealing with primitives, arrays and objects, as well as algorithms, DOM manipulation functions and Node.js utilities.
JavaScript, Date
Calculates the date of n
days ago from today as a string representation.
JavaScript, Date
Checks if the given string is valid in the simplified extended ISO format (ISO 8601).
JavaScript, Date
Calculates the date of n
days from today as a string representation.
JavaScript, Date
Returns the maximum of the given dates.
JavaScript, Date
Returns the minimum of the given dates.
JavaScript, Date
Returns the zero-indexed week of the year that a date corresponds to.
JavaScript, Date
Calculates the difference (in months) between two dates.
JavaScript, Date
Gets the Unix timestamp from a Date
object.
JavaScript, Date
Results in a string representation of tomorrow's date.
JavaScript, Date
Results in a string representation of yesterday's date.
JavaScript, Date
Converts an integer to a suffixed string, adding am
or pm
based on its value.
JavaScript, Date
Calculates the difference (in days) between two dates.
JavaScript, Date
Calculates the difference (in hours) between two dates.
JavaScript, Date
Calculates the difference (in minutes) between two dates.
JavaScript, Date
Calculates the difference (in seconds) between two dates.