From: Jorge on
On Mar 4, 11:44 pm, Dr J R Stockton <reply1...(a)merlyn.demon.co.uk>
wrote:
> In comp.lang.javascript message <c1814492-916b-412f-8cee-1c6aa1f1e6a5(a)33
> g2000yqj.googlegroups.com>, Thu, 4 Mar 2010 08:06:37, Jorge
> <jo...(a)jorgechamorro.com> posted:
>
> >--> "2010-03-04T16:05:56.319Z"
>
> But with which browser or other agent?  None of mine seem to show
> fractional seconds.

Webkit r55454.
--
Jorge.
From: Dr J R Stockton on
In comp.lang.javascript message <2543671.78ljVUCQOu(a)PointedEars.de>,
Fri, 5 Mar 2010 01:40:52, Thomas 'PointedEars' Lahn <PointedEars(a)web.de>
posted
>Dr J R Stockton wrote:
>
>> [...] Jorge posted:
>>>--> "2010-03-04T16:05:56.319Z"
>>
>> But with which browser or other agent? None of mine seem to show
>> fractional seconds.
>>
>> My Cr4 & SF4 have toJSON & toISOString
>> My IE8 has toJSON but not toISOString
>> My FF3.0 & Op10.10 have neither.
>
>I am getting a value in that format in Iceweasel 3.5.8 (Gecko 1.9.1.8).
>However, those who have read ES 5, section 15.9.5.44, would probably use
>
> (new Date()).toISOString()
>
>instead of
>
> (new Date()).toJSON()


The string is compliant with a small subset of ISO 8601:2004, which you
should have read. ISO 8601 is a small subset of ISO.

The string is probably be compliant with all or nearly all of the
applicable parts of the JSON spec.

Therefore the JSON name is better.

The ES5 people were notified of the inappropriateness of the name
toISOString; the argument was accepted, but too late to be useful.

The Date2 Object will output strings to at least a large subset of
applicable ISO 8601.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.07 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
From: Thomas 'PointedEars' Lahn on
Dr J R Stockton wrote:

> Thomas 'PointedEars' Lahn posted:
>> Dr J R Stockton wrote:
>>> [...] Jorge posted:
>>>>--> "2010-03-04T16:05:56.319Z"
>>>
>>> But with which browser or other agent? None of mine seem to show
>>> fractional seconds.
>>>
>>> My Cr4 & SF4 have toJSON & toISOString
>>> My IE8 has toJSON but not toISOString
>>> My FF3.0 & Op10.10 have neither.
>>
>> I am getting a value in that format in Iceweasel 3.5.8 (Gecko 1.9.1.8).
>> However, those who have read ES 5, section 15.9.5.44, would probably use
>>
>> (new Date()).toISOString()
>>
>> instead of
>>
>> (new Date()).toJSON()
>
> The string is compliant with a small subset of ISO 8601:2004, which you
> should have read. ISO 8601 is a small subset of ISO.

It should be obvious that the method of Date instances having `ISO' in
its identifier would pertain to one of the time formats specified in the
corresponding ISO standard.

> The string is probably be compliant with all or nearly all of the
> applicable parts of the JSON spec.
>
> Therefore the JSON name is better.

You cannot be serious advocating the use of a less efficient wrapper, there
needless, wrapper, only because its "name" would be "better" by some rather
weird interpretation of the meaning of method identifiers.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(a)news.demon.co.uk>
From: Dr J R Stockton on
In comp.lang.javascript message <1781308.bC2pHGDlbC(a)PointedEars.de>,
Sun, 7 Mar 2010 01:31:00, Thomas 'PointedEars' Lahn <PointedEars(a)web.de>
posted
>Dr J R Stockton wrote:
>
>> Thomas 'PointedEars' Lahn posted:
>>> Dr J R Stockton wrote:


>>> However, those who have read ES 5, section 15.9.5.44, would probably use
>>>
>>> (new Date()).toISOString()
>>>
>>> instead of
>>>
>>> (new Date()).toJSON()
>>
>> The string is compliant with a small subset of ISO 8601:2004, which you
>> should have read. ISO 8601 is a small subset of ISO.
>
>It should be obvious that the method of Date instances having `ISO' in
>its identifier would pertain to one of the time formats specified in the
>corresponding ISO standard.

By using "toISOString" we now have uncertainty, and no consistent means
of discriminating between the various date and time formats in 8601.

It needs to be "toISO8601ExtendedCalendarDateAndTime", IIRC, for the
present code.

However, because of the versatility of 8601, date formatting is best
done with a format string, giving individual identifiers only to the
commonest cases of YYYY-MM-DD & hh:mm:ss. The DATE2 Object shows how
that can be done. Given the importance of international standards
outside the USA, the amount of code to implement it within a browser
would not be unreasonable; and non-ISO formats would also be available.

Remember, the authors of ECMA 262-5 are, like yourself, not persons with
any real breadth of knowledge. It seems improbable that many, if any,
of them have actually read ISO 8601.

>> The string is probably be compliant with all or nearly all of the
>> applicable parts of the JSON spec.
>>
>> Therefore the JSON name is better.
>
>You cannot be serious advocating the use of a less efficient wrapper, there
>needless, wrapper, only because its "name" would be "better" by some rather
>weird interpretation of the meaning of method identifiers.

Gobbledegook.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.07 IE 8.
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
From: Thomas 'PointedEars' Lahn on
Dr J R Stockton wrote:

> Thomas 'PointedEars' Lahn posted:
>> Dr J R Stockton wrote:
>>> Thomas 'PointedEars' Lahn posted:
>>>> Dr J R Stockton wrote:
>>>> However, those who have read ES 5, section 15.9.5.44, would probably
>>>> use
>>>>
>>>> (new Date()).toISOString()
>>>>
>>>> instead of
>>>>
>>>> (new Date()).toJSON()
>>>
>>> The string is compliant with a small subset of ISO 8601:2004, which you
>>> should have read. ISO 8601 is a small subset of ISO.
>>
>> It should be obvious that the method of Date instances having `ISO' in
>> its identifier would pertain to one of the time formats specified in the
>> corresponding ISO standard.
>
> By using "toISOString" we now have uncertainty, and no consistent means
> of discriminating between the various date and time formats in 8601.

On closer inspection it turns out that the implementors of the
implementations you tested have released implementations that do not comply
with ES 5 (but that may not be their fault, their implementations may have
been ready before ES 5 Final [Draft] was issued; it would help if you
provided more detailed version information):

The format to be used for the return value is explicitly specified in
section 15.9.5.42 by reference to section 15.9.1.15 and the definition that
"All fields are present in the String." This is met by JavaScript 1.8.1 as
of Gecko 1.9.1.8.

> It needs to be "toISO8601ExtendedCalendarDateAndTime", IIRC, for the
> present code.

Of course not. But the existence of the general method allows for a
parameter that defines the format in the future, which maybe causes a
method as you propose to be called (although I hope someone wiser makes
the choice of method name).

> [...]
> Remember, the authors of ECMA 262-5 are, like yourself, not persons with
> any real breadth of knowledge. It seems improbable that many, if any,
> of them have actually read ISO 8601.

"How annoying, all these people are driving in the wrong direction!"

>>> The string is probably be compliant with all or nearly all of the
>>> applicable parts of the JSON spec.
>>>
>>> Therefore the JSON name is better.
>>
>> You cannot be serious advocating the use of a less efficient wrapper,
^^^^^^^
>> there needless, wrapper, only because its "name" would be "better" by
>> some rather weird interpretation of the meaning of method identifiers.
>
> Gobbledegook.

Yes, there was an extra "wrapper" because of rewording. Sorry.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann