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
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
Gets the name of the weekday 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
Calculates the difference (in months) between two dates.
JavaScript, Date
Gets the Unix timestamp from a Date
object.
JavaScript, Date
Returns the string representation of the last date in the given date's month.
JavaScript, Date
Converts an integer to a suffixed string, adding am
or pm
based on its value.
JavaScript, Date
Gets the number of days in the given month
of the specified year
.
JavaScript, Date
Creates a Date
object from a Unix timestamp.
JavaScript, Date
Calculates the difference (in days) between two dates.