Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CB8906B3F for ; Wed, 6 Jul 2011 23:28:24 +0000 (UTC) Received: (qmail 44015 invoked by uid 500); 6 Jul 2011 23:28:23 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 43872 invoked by uid 500); 6 Jul 2011 23:28:22 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 43858 invoked by uid 99); 6 Jul 2011 23:28:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2011 23:28:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of markjreed@gmail.com designates 74.125.82.54 as permitted sender) Received: from [74.125.82.54] (HELO mail-ww0-f54.google.com) (74.125.82.54) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2011 23:28:16 +0000 Received: by wwf4 with SMTP id 4so390065wwf.23 for ; Wed, 06 Jul 2011 16:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=csMesRkcFUC/bYQmVvBzCJHrkdnvTWzdYdwDsFDIwUI=; b=KvMN2GRMMrEiQjPGnILYRAzq/Ty78pXbSMHG+09uYEPQRng/rvc2j1l6JaepvT1URk TgtB73GvF/463QFkmN0mrlvZ3prNBw3soTBhFEaqjsC25TuaaEqRgAW3vfK+vqoKw6RU 3q+58G11Ygf01iB6SD9XbGYLp93l24RTQkSjY= MIME-Version: 1.0 Received: by 10.227.13.135 with SMTP id c7mr100533wba.111.1309994875253; Wed, 06 Jul 2011 16:27:55 -0700 (PDT) Received: by 10.227.195.76 with HTTP; Wed, 6 Jul 2011 16:27:55 -0700 (PDT) In-Reply-To: References: Date: Wed, 6 Jul 2011 19:27:55 -0400 Message-ID: Subject: Re: json date representations From: "Mark J. Reed" To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=002215975bba3275f604a76ef333 --002215975bba3275f604a76ef333 Content-Type: text/plain; charset=UTF-8 On Wed, Jul 6, 2011 at 3:44 PM, Randall Leeds wrote: > On Wed, Jul 6, 2011 at 12:08, Mark J. Reed wrote: > > On Wed, Jul 6, 2011 at 2:12 PM, Mark Hahn 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 --002215975bba3275f604a76ef333--