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.
Returns the human-readable format of the given number of milliseconds.
JavaScript, Date · Oct 22, 2020
Learn all the different ways you can implement a sleep()
function in JavaScript.
JavaScript, Date · Nov 6, 2021
Returns the ISO format of the given number of seconds.
JavaScript, Date · Oct 13, 2021
Calculates the date of n
minutes from the given date, returning its string representation.
JavaScript, Date · Nov 28, 2020
Counts the weekdays between two dates.
JavaScript, Date · Oct 20, 2020
Creates a generator, that generates all dates in the given range using the given step.
JavaScript, Date · Jun 21, 2021
Checks if a valid date object can be created from the given values.
JavaScript, Date · Oct 20, 2020
Converts a date to extended ISO format (ISO 8601), including timezone offset.
JavaScript, Date · Oct 13, 2021
Calculates the date of n
days from the given date, returning its string representation.
JavaScript, Date · Nov 28, 2020
Calculates the date after adding the given number of business days.
JavaScript, Date · Jan 7, 2021
Learn how you can compare two dates in JavaScript using various different techniques.
JavaScript, Date · Jan 16, 2022
Gets the day of the year (number in the range 1-366) from a Date
object.
JavaScript, Date · Oct 19, 2020
Returns a string of the form HH:MM:SS
from a Date
object.
JavaScript, Date · Oct 19, 2020
Checks if the given string is valid in the simplified extended ISO format (ISO 8601).
JavaScript, Date · Nov 29, 2020
Returns the quarter and year to which the supplied date belongs to.
JavaScript, Date · Oct 22, 2020