30秒学会 JavaScript 片段 – Date range generator
Creates a generator, that generates all dates in the given range using the given step. Use a while l...
Creates a generator, that generates all dates in the given range using the given step. Use a while l...
As mentioned previously, Date objects in JavaScript act similar to numbers. This means that you can ...
I’ve often found myself needing to check if a given date is a weekday or weekend. As I’m...
Checks if the given date is a weekday. Use datetime.datetime.weekday() to get the day of the week as...
Calculates the date of n days ago from today. Use datetime.date.today() to get the current day. Use ...
The ISO 8601 standard defines a format for dates and times. It is widely adopted across the world an...
Gets the day of the year from a Date object. Use new Date() and Date.prototype.getFullYear() to get ...
Returns yesterday’s DateTime value. Use DateTime.Now to get the current date, then use DateTim...
Results in a string representation of yesterday’s date. Use new Date() to get the current date...
Returns a string of the form HH:MM:SS from a Date object. Use Date.prototype.toTimeString() and Stri...