Built with usability in mind, but there's still room to grow
Here's a note that may address a confusing point of the code: the time units represented in an entry are not intended to represent everything that a JavaScript Date object represents, but to be maximally compatible with a JavaScript Date object. This means, in particular, that some programmer-confusing designs of the Date object are accommodated in our code because the JavaScript Date object numbers the dates of a month from 1 to 31, just like general calendar use, but months are represented from 0 (January) to 11 (December). Similarly, hours range from 0 to 23 in the Date object.
This function is a constructor in terms of what it does, but it is not designed for the new keyword, as the ...
Get React: Building Modern Web Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.