Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #32954 > unrolled thread
| Started by | RobG <rgqld@iinet.net.au> |
|---|---|
| First post | 2017-04-06 16:17 -0700 |
| Last post | 2017-04-10 19:15 -0700 |
| Articles | 16 — 6 participants |
Back to article view | Back to comp.lang.javascript
Is Date.prototoype.toString always en-us? RobG <rgqld@iinet.net.au> - 2017-04-06 16:17 -0700
Re: Is Date.prototoype.toString always en-us? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-04-07 13:35 +0200
Re: Is Date.prototoype.toString always en-us? RobG <rgqld@iinet.net.au> - 2017-04-08 08:47 +1000
Re: Is Date.prototoype.toString always en-us? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-04-08 20:13 +0200
Re: Is Date.prototoype.toString always en-us? John G Harris <niam@jghnorth.org.uk.invalid> - 2017-04-09 11:58 +0100
Re: Is Date.prototoype.toString always en-us? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-04-09 15:54 +0200
Re: Is Date.prototoype.toString always en-us? Luuk <luuk@invalid.lan> - 2017-04-09 16:02 +0200
Re: Is Date.prototoype.toString always en-us? John G Harris <niam@jghnorth.org.uk.invalid> - 2017-04-09 16:51 +0100
Re: Is Date.prototoype.toString always en-us? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-04-09 18:09 +0200
Re: Is Date.prototoype.toString always en-us? John G Harris <niam@jghnorth.org.uk.invalid> - 2017-04-10 10:34 +0100
Re: Is Date.prototoype.toString always en-us? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-04-11 06:26 +0200
Re: Is Date.prototoype.toString always en-us? John G Harris <niam@jghnorth.org.uk.invalid> - 2017-04-11 18:38 +0100
Re: Is Date.prototoype.toString always en-us? RobG <rgqld@iinet.net.au> - 2017-04-14 15:57 +1000
Re: Is Date.prototoype.toString always en-us? RobG <rgqld@iinet.net.au> - 2017-04-14 16:45 +1000
Re: Is Date.prototoype.toString always en-us? Dr J R Stockton <reply1700@merlyn.demon.co.uk.invalid> - 2017-04-10 21:16 +0100
Re: Is Date.prototoype.toString always en-us? Julio Di Egidio <julio@diegidio.name> - 2017-04-10 19:15 -0700
| From | RobG <rgqld@iinet.net.au> |
|---|---|
| Date | 2017-04-06 16:17 -0700 |
| Subject | Is Date.prototoype.toString always en-us? |
| Message-ID | <ef8a2a84-de5e-4e9a-89fc-3144b262150c@googlegroups.com> |
In the MDN documentation for *Date.prototype.toString*[1] is the claim that: > "The toString() method always returns a string representation of the date in American English." Noting that the documentation is primarily for Mozilla browsers, can someone confirm that in, say, Firefox, that Date.prototype.toString returns a string in US English, regardless of the default language of the host system? Also, whether this statement is true for other browsers where the default language is other than English? [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toString -- RobG
[toc] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-04-07 13:35 +0200 |
| Message-ID | <1779206.oMNUckLgyt@PointedEars.de> |
| In reply to | #32954 |
Stefan Ram wrote: > RobG <rgqld@iinet.net.au> writes: >>Also, whether this statement is true for other browsers where >>the default language is other than English? > > I believe that in ECMAScript it returns an > implementation-dependent string value that represents the > date as a date and time in the current time zone using > »a convenient, human-readable form«. Yes. <http://www.ecma-international.org/ecma-262/7.0/#sec-date.prototype.tostring> p. [When will you learn to cite your sources?] -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | RobG <rgqld@iinet.net.au> |
|---|---|
| Date | 2017-04-08 08:47 +1000 |
| Message-ID | <qM6dnVMmKJqEinXFnZ2dnUU7-NnNnZ2d@westnet.com.au> |
| In reply to | #32954 |
On 7/04/2017 09:34, Stefan Ram wrote: > RobG <rgqld@iinet.net.au> writes: >> Also, whether this statement is true for other browsers where >> the default language is other than English? > > I believe that in ECMAScript it returns an > implementation-dependent string value that represents the > date as a date and time in the current time zone using > »a convenient, human-readable form«. Yes, per ECMA-262, but question is about MDN, not ECMA-262. > (comment from me [S.R.]:) The English language /is/ most > convenient and human-readable, so ECMAScript effectivly > confirms the default language of English, even when > ECMAScript - possibly for political reasons - does not > mention »English« here. I don't think that's a sensible conclusion. -- Rob
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-04-08 20:13 +0200 |
| Message-ID | <3000232.1N4lFRLu8V@PointedEars.de> |
| In reply to | #32964 |
RobG wrote:
^^^^
Your real name belongs there.
> On 7/04/2017 09:34, Stefan Ram wrote:
>> RobG <rgqld@iinet.net.au> writes:
>>> Also, whether this statement is true for other browsers where
>>> the default language is other than English?
>>
>> I believe that in ECMAScript it returns an
>> implementation-dependent string value that represents the
>> date as a date and time in the current time zone using
>> »a convenient, human-readable form«.
>
> Yes, per ECMA-262, but question is about MDN, not ECMA-262.
You are proceeding from a false assumption. MDN is _not_ a documentation
“primarily for Mozilla browsers”.
However, if I install iceweasel-l10n-de=1:38.8.0esr-1~deb8u1, and execute
“LC_ALL=de_CH.UTF-8 iceweasel”, although the GUI now is in German,
(new Date()).toString()
still is in English ("Sat Apr 08 2017 20:…:… GMT+0200 (CEST)").
(new Date()).toLocaleString()
and
(new Date()).toLocaleString("de")
are not ("8.4.2017 20:…:…").
--
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2017-04-09 11:58 +0100 |
| Message-ID | <dt4kectg2f38cou5k2osbckf62re140c77@4ax.com> |
| In reply to | #32967 |
On Sat, 08 Apr 2017 20:13:57 +0200, Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote: >RobG wrote: >^^^^ >Your real name belongs there. <snip> I wonder how Thomas would react if there were an article from Elizabeth R ? John
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-04-09 15:54 +0200 |
| Message-ID | <1770281.AAz39kb0Nr@PointedEars.de> |
| In reply to | #32974 |
John G Harris wrote: > On Sat, 08 Apr 2017 20:13:57 +0200, Thomas 'PointedEars' Lahn > <PointedEars@web.de> wrote: > >>RobG wrote: >>^^^^ >>Your real name belongs there. > <snip> > > I wonder how Thomas would react if there were an article from > Elizabeth R ? I wonder, when will you stop posting attribution novels, start posting on topic, and stop referring to people whose postings you reply to in the third person? -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Luuk <luuk@invalid.lan> |
|---|---|
| Date | 2017-04-09 16:02 +0200 |
| Message-ID | <58ea3eed$0$741$e4fe514c@news.xs4all.nl> |
| In reply to | #32976 |
On 09-04-17 15:54, Thomas 'PointedEars' Lahn wrote:
^^^^^^^^^^^^^^^^^^^^^^^^^
Your real name belongs there
> John G Harris wrote:
>
>> On Sat, 08 Apr 2017 20:13:57 +0200, Thomas 'PointedEars' Lahn
>> <PointedEars@web.de> wrote:
>>
>>> RobG wrote:
>>> ^^^^
>>> Your real name belongs there.
>> <snip>
>>
> I wonder, when will you stop posting ...
;)
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2017-04-09 16:51 +0100 |
| Message-ID | <32mkecpokj4lo8bn10egh8tbippi0ndivl@4ax.com> |
| In reply to | #32976 |
On Sun, 09 Apr 2017 15:54:30 +0200, Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote: >John G Harris wrote: > >> On Sat, 08 Apr 2017 20:13:57 +0200, Thomas 'PointedEars' Lahn >> <PointedEars@web.de> wrote: >> >>>RobG wrote: >>>^^^^ >>>Your real name belongs there. >> <snip> >> >> I wonder how Thomas would react if there were an article from >> Elizabeth R ? >I wonder, when will you stop posting attribution novels, When someone invents an attribution format that doesn't have a catastrophic design error in it. As Thomas 'PointedEars' Lahn wrote : >I implore you to apply more critical thinking to *everything* that you read. and that includes the justification of the attribution format you, Thomas, keep referring to. >start posting on >topic, Since when have peoples' preferred cognomens been On Topic here ? Or do you, Thomas, think that everyone must use a name approved by the German State ? >and stop referring to people whose postings you reply to in the third >person? As Thomas 'PointedEars' Lahn wrote : >this is _not_ a chat room. My article was addressed to the News Group, not restricted to the individual who keeps on writing "Score adjusted". John
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-04-09 18:09 +0200 |
| Message-ID | <5971914.vCaTGLijfX@PointedEars.de> |
| In reply to | #32978 |
John G Harris wrote: > […] Thomas 'PointedEars' Lahn […] wrote: >> John G Harris wrote: >>> On Sat, 08 Apr 2017 20:13:57 +0200, Thomas 'PointedEars' Lahn >>> <PointedEars@web.de> wrote: >>>>RobG wrote: >>>>^^^^ >>>>Your real name belongs there. >>> <snip> >>> >>> I wonder how Thomas would react if there were an article from >>> Elizabeth R ? >> >> I wonder, when will you stop posting attribution novels, > > When someone invents an attribution format that doesn't have a > catastrophic design error in it. Your attribution format has a considerable, if not catastrophic, design error in it: It makes discussions harder to read at no real advantage. > As Thomas 'PointedEars' Lahn wrote : >> I implore you to apply more critical thinking to *everything* that you >> read. > > and that includes the justification of the attribution format you, > Thomas, keep referring to. Ripping my statements out of context does not help your case either. >> start posting on topic, > > Since when have peoples' preferred cognomens been On Topic here ? They have not, so why are you attempting to *discuss* about that? However, you are deliberately overlooking the fact that this was not the only thing that I posted. Who do you think you can try to fool here? > Or do you, Thomas, think that everyone must use a name approved by the > German State ? (Just do not omit “Nazi” there and you have successfully fulfilled Godwin’s Law.) Not at all. As I explained to you many times before, it is simply a matter of simple politeness, of telling your name to people who do not know you. As you are going all nationalistic now, let me put this to you: You are British. It has been my impression so far that you British are proud of your politeness, and I appreciate that. But I fail to see anything of it in your actions so far. Why? >>and stop referring to people whose postings you reply to in the third >>person? > > As Thomas 'PointedEars' Lahn wrote : >>this is _not_ a chat room. > > My article was addressed to the News Group, not restricted to the > individual who keeps on writing "Score adjusted". You delude yourself if you think that anyone reasonable is falling for your deception. -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2017-04-10 10:34 +0100 |
| Message-ID | <9ckmecd85ej2qc732b9d34incg0q8o30m9@4ax.com> |
| In reply to | #32979 |
On Sun, 09 Apr 2017 18:09:35 +0200, Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote: >John G Harris wrote: <snip> >> Or do you, Thomas, think that everyone must use a name approved by the >> German State ? > >(Just do not omit “Nazi” there and you have successfully fulfilled Godwin’s >Law.) You, Thomas, are being too sensitive. I'm merely saying that your idea of a 'real' name is based on your country's laws and customs. And I keep pointing out to you that other countries have different laws and customs. >Not at all. As I explained to you many times before, it is simply a matter >of simple politeness, of telling your name to people who do not know you. <snip> In England your name is whatever you can persuade people to call you, and can be different for different groups of people. There is nothing wrong with politely and consistently naming yourself RobG. The same may well be true in Australia. Anyway, is all this huffing and puffing a way of avoiding my question about Elizabeth R ? John
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-04-11 06:26 +0200 |
| Message-ID | <1552500.zsthll1eA3@PointedEars.de> |
| In reply to | #32988 |
John G Harris wrote: > On Sun, 09 Apr 2017 18:09:35 +0200, Thomas 'PointedEars' Lahn > <PointedEars@web.de> wrote: >>John G Harris wrote: > <snip> >>> Or do you, Thomas, think that everyone must use a name approved by the >>> German State ? >>(Just do not omit Nazi there and you have successfully fulfilled >>Godwins Law.) > > You, Thomas, are being too sensitive. I'm merely saying that your idea > of a 'real' name is based on your country's laws and customs. It is not. Read, for example, RFC 1855, and notice the country of origin of the author. > And I keep pointing out to you that other countries have different laws > and customs. Wishful thinking. >>Not at all. As I explained to you many times before, it is simply a >>matter of simple politeness, of telling your name to people who do not >>know you. > <snip> > > In England your name is whatever you can persuade people to call you, > and can be different for different groups of people. There is nothing > wrong with politely and consistently naming yourself RobG. The same > may well be true in Australia. More wishful thinking. To begin with, Usenet (sub)culture has very little to do with country of origin, something nationalists like you are never going to understand. > Anyway, is all this huffing and puffing a way of avoiding my question > about Elizabeth R ? Your question is a red herring, and it is unsuccessful. BTW, your newsreader is still broken/misconfigured. EOD. -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2017-04-11 18:38 +0100 |
| Message-ID | <t35qecdhbh6ukccm6up3fbkf9tucicjisu@4ax.com> |
| In reply to | #32991 |
On Tue, 11 Apr 2017 06:26:33 +0200, Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote: >John G Harris wrote: <snip> >> You, Thomas, are being too sensitive. I'm merely saying that your idea >> of a 'real' name is based on your country's laws and customs. > >It is not. Read, for example, RFC 1855, and notice the country of origin of >the author. RFC 1855 doesn't mention 'real name'. >> And I keep pointing out to you that other countries have different laws >> and customs. > >Wishful thinking. <snip> So ethnology doesn't exist then then. Why so many professors of ethnology ? >> In England your name is whatever you can persuade people to call you, >> and can be different for different groups of people. There is nothing >> wrong with politely and consistently naming yourself RobG. The same >> may well be true in Australia. > >More wishful thinking. Not wishful thinking - books written by baristers, law professors, and chief constables. >To begin with, Usenet (sub)culture has very little >to do with country of origin, something nationalists like you are never >going to understand. <snip> Irrelevant. If you, Thomas, want to complain about the lack of a 'real name' then you have to tell us your definition of a 'real name'. John
[toc] | [prev] | [next] | [standalone]
| From | RobG <rgqld@iinet.net.au> |
|---|---|
| Date | 2017-04-14 15:57 +1000 |
| Message-ID | <c3bb8ccf-b8f6-d6d1-1207-f5a31cffef06@iinet.net.au> |
| In reply to | #32967 |
On 9/04/2017 04:13, Thomas 'PointedEars' Lahn wrote:
[...]
> You are proceeding from a false assumption. MDN is _not_ a documentation
> “primarily for Mozilla browsers”.
Noted.
>
> However, if I install iceweasel-l10n-de=1:38.8.0esr-1~deb8u1, and execute
> “LC_ALL=de_CH.UTF-8 iceweasel”, although the GUI now is in German,
>
> (new Date()).toString()
>
> still is in English ("Sat Apr 08 2017 20:…:… GMT+0200 (CEST)").
>
> (new Date()).toLocaleString()
>
> and
>
> (new Date()).toLocaleString("de")
>
> are not ("8.4.2017 20:…:…").
Thank you.
--
Rob
[toc] | [prev] | [next] | [standalone]
| From | RobG <rgqld@iinet.net.au> |
|---|---|
| Date | 2017-04-14 16:45 +1000 |
| Message-ID | <98-dnZG_eIa67W3FnZ2dnUU7-d_NnZ2d@westnet.com.au> |
| In reply to | #32967 |
On 9/04/2017 04:13, Thomas 'PointedEars' Lahn wrote:
[...]
> You are proceeding from a false assumption. MDN is _not_ a documentation
> “primarily for Mozilla browsers”.
Noted.
> However, if I install iceweasel-l10n-de=1:38.8.0esr-1~deb8u1, and execute
> “LC_ALL=de_CH.UTF-8 iceweasel”, although the GUI now is in German,
>
> (new Date()).toString()
>
> still is in English ("Sat Apr 08 2017 20:…:… GMT+0200 (CEST)").
>
> (new Date()).toLocaleString()
>
> and
>
> (new Date()).toLocaleString("de")
>
> are not ("8.4.2017 20:…:…").
Thanks.
--
Rob
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <reply1700@merlyn.demon.co.uk.invalid> |
|---|---|
| Date | 2017-04-10 21:16 +0100 |
| Message-ID | <GLWoXCSeg+6YFwqT@invalid.uk.co.demon.merlyn.invalid> |
| In reply to | #32954 |
In comp.lang.javascript message <ef8a2a84-de5e-4e9a-89fc-3144b262150c@go oglegroups.com>, Thu, 6 Apr 2017 16:17:29, RobG <rgqld@iinet.net.au> posted: >In the MDN documentation for *Date.prototype.toString*[1] is the claim that: > >> "The toString() method always returns a string representation of the >>date in American English." That ">>" statement is sloppily wrong, since toString returns both date and time; and it is ambiguous, at least because (for example) currently a New York resident might expect to see, in respect of the offset-from- GMT indication, nothing or ET or EDT or maybe -0400. >Noting that the documentation is primarily for Mozilla browsers, can >someone confirm that in, say, Firefox, that Date.prototype.toString >returns a string in US English, regardless of the default language of >the host system? If you want to know the answer as a coder, then you should avoid using, as far as it is possible, any part of a standard or other document which has the least taint of relevant ambiguity. In JavaScript, it seems reasonable to trust getFullYear ... getMilliseconds in local and UTC versions (but those are not entirely right in at lease the final version of Windows Safari; and, as I wrote recently here, in Windows Command Prompt CScript JScript), and it is easy enough to use those functions to produce ISO 8601 date/time strings, which should be understood everywhere that uses the Gregorian Calendar. Those who use YYYY-DD-MM *deserve* to suffer. If you disagree, use YYYY-Month-DD or YYYY-Mon-DD. To be unambiguously obscure, use YYYY-i- 01 to YYYY-xii-31 - Unicode has individual characters for i to xii and for I to XII. >Also, whether this statement is true for other browsers where the >default language is other than English? Note that the default language of the authoring and reading systems are not necessarily the same and neither is necessarily the language of the main text of a document. I know a student (non-UK EU by nationality), whose own computer system is set to some sort of English, who can only communicate with his maternal grandmother in Obscure Foreign, but any computing equipment she might see may well be set to Another EU. And, RobG, a neighbour speaks your language. -- (c) John Stockton, Surrey, UK. ¬@merlyn.demon.co.uk Turnpike v6.05 MIME. Merlyn Web Site < > - FAQish topics, acronyms, & links. --- This email has been checked for viruses by AVG. http://www.avg.com
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2017-04-10 19:15 -0700 |
| Message-ID | <fecce639-f02f-4cb9-8f1e-56821ccaa400@googlegroups.com> |
| In reply to | #32989 |
On Tuesday, April 11, 2017 at 12:43:18 AM UTC+2, Dr J R Stockton wrote: > In comp.lang.javascript message <ef8a2a84-de5e-4e9a-89fc-3144b262150c@go > oglegroups.com>, Thu, 6 Apr 2017 16:17:29, RobG <rgqld@iinet.net.au> > posted: <snipped throughout> > >In the MDN documentation for *Date.prototype.toString*[1] is the claim that: > > > >> "The toString() method always returns a string representation of the > >>date in American English." > > That ">>" statement is sloppily wrong, since toString returns both date > and time; and it is ambiguous It is not ambiguous, it refers to Date objects, which contain information at least down to the milliseconds: the technical dictionary just is not the everyday dictionary. > >Noting that the documentation is primarily for Mozilla browsers, can > >someone confirm that in, say, Firefox, that Date.prototype.toString > >returns a string in US English, regardless of the default language of > >the host system? > > If you want to know the answer as a coder, then you should avoid using, > as far as it is possible, any part of a standard or other document which > has the least taint of relevant ambiguity. In JavaScript, it seems > reasonable to trust getFullYear ... People should learn to read the reference documentation first and foremost. JS does have some quirks, partly with the standard itself and mainly with a story of poor browser implementations, but even that, e.g. on MDN but not only, by now is very well covered: just, the last thing a professional programmer needs is "trust", which in our case is rather another name for "guessing" or "magic" or "it works"... > it is easy enough to use those functions to > produce ISO 8601 date/time strings, which should be understood > everywhere that uses the Gregorian Calendar. There is also a Date.prototype.toISOString(), and some more. The student should also learn the important and initially confusing distinction between internal representations and formats for display or transmission. Julio
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web