Re: ecmascript 5 DATESTYLE

From: ben hockey <neonstalwart(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Mike Fowler <mike(at)mlfowler(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ecmascript 5 DATESTYLE
Date: 2011-12-07 21:11:37
Message-ID: F60B21FB-5FEA-4A8E-9211-3D6905255FB6@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Dec 7, 2011, at 3:56 PM, Peter Eisentraut wrote:

> On tis, 2011-12-06 at 15:15 -0500, Tom Lane wrote:
>> TBH, I think that inventing a new datestyle setting "ECMA" would be a
>> more appropriate investment of effort.
>
> So we'd have a setting called "ECMA" that's really ISO, and a setting
> called "ISO" that's really SQL, and a setting called "SQL" that's
> really
> Postgres, and a setting called "Postgres" that's also Postgres but
> different.
>

...and a setting called "XSD" that's also ISO.

for now i'm backing away from the ECMA option - what i was thinking of
would be exactly the same as "XSD" except rather than a timezone of
'+00:00' it would be a 'Z'. from some quick searching, it seems that
XSD should be capable of understanding 'Z' rather than '+00:00' so if
i was going to do anything i'd work towards making that change to 'XSD'.

however, as it turns out, the constraint i have that is requiring me
to use 'Z' is not actually from ECMAScript 5 but from json-schema (http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23
). XSD is fully compatible with ECMAScript 5 date time string format (http://es5.github.com/#x15.9.1.15
) so i'm going to sit on this again for a little while and think some
more. maybe try to convince json-schema to relax their definition of
date-time format.

i'll be back when i have a clear picture of what i think makes the
most sense.

thanks,

ben...

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2011-12-07 21:37:20 Re: documentation issue - extensions
Previous Message Peter Eisentraut 2011-12-07 20:56:02 Re: ecmascript 5 DATESTYLE