On Wed, Jul 6, 2011 at 3:44 PM, Randall Leeds <[email protected]>wrote:

> On Wed, Jul 6, 2011 at 12:08, Mark J. Reed <[email protected]> wrote:
> > On Wed, Jul 6, 2011 at 2:12 PM, Mark Hahn <[email protected]> wrote:
> >
> >> Who decided months should be zero-based but not days?
> >>
> >
> > Not sure who the author was, but the motivation is that the month (and
> > weekday) number is expected to be used to index into an array of names,
> and
> > arrays are 0-based.  The day of the month is not an index into a list, so
> it
> > survives unmolested.
>
> Not true in a lot of languages (notably here: Erlang).
>

True, but not really relevant, as calendar:local_time/0 also returns months
numbered from 1. :)

Sorry for taking this thread off-track; I started off discussing the
limitations of JSON and the various choices in representing dates, and how
it would in many cases be more convenient, when deserializing into
JavaScript, to take advantage of JavaScript syntax not normally allowed in
JSON for creating actual Date objects.  Which led to a tangent about the
options for constructing such objects in JavaScript still not being terribly
easy to read for humans...

-- 
Mark J. Reed <[email protected]>

Reply via email to