Articles with the tag #Date:

Image of code sample for the article: How can I add X days to a JavaScript Date object?

How can I add X days to a JavaScript Date object?

One of the more infamous sides of JavaScript has been its date and time constructs. After years of having to use Datejs/Moment.js for many date-handling tasks, I have found more and more that the native Date constructor is almost always good enough, saving many precious bytes to download. …read more

Image of code sample for the article: Format

Format "5 days ago" localized relative date strings in a few lines with native JavaScript

The native Intl.RelativeTimeFormat API can generate nicely formatted relative date/time strings without any external dependencies. …read more