Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #34490

Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale

Newsgroups comp.lang.javascript
Date 2018-01-06 11:18 -0800
References <9acafc2f-1bc7-442f-adb7-ee34368545a8@googlegroups.com> <p2qodd$1rd5$1@gioia.aioe.org>
Message-ID <49e9404e-ae0e-4e2c-ab90-bb1afd2b5409@googlegroups.com> (permalink)
Subject Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale
From Dr J R Stockton <J.R.Stockton@physics.org>

Show all headers | View raw


On Saturday, January 6, 2018 at 3:02:17 PM UTC, Joao Rodrigues wrote:
> On 31/12/2017 15:57, Dr J R Stockton wrote:
> > All of my PCs are set, everywhere that I have found, to
> > use UK, English, and ISO 8601, including the 24-hour clock.
> > ...

> You may use .toLocaleTimeString() with the new locales and options 
> arguments [1]:
> 
> var date = new Date();
> var options = {
>    year: 'numeric', month: 'numeric', day: 'numeric',
>    hour: 'numeric', minute: 'numeric', second: 'numeric',
>    hour12: false,
>    timeZone: 'GMT' // London - UK
> };
> 
> console.log(date.toLocaleTimeString('en-GB', options));
> // 06/01/2018, 14:57:25


toLocaleTimeString SHOULD NOT give the _date_, so either the spec or the implementation is WRONG.

> Or use the Intl object from the ECMAScript Internationalization API [2] 
> directly:
> 
> console.log(new Intl.DateTimeFormat('en-GB', options).format(date));

It can give the same, but that format is not ISO8601:2004 (which, according to Wikipedia, is the latest).  Date field order wrong, date separator wrong. date/time separator wrong.  The method appears unknown to IE11 in Win7.

Also, timeZone is a terminological ineptitude; a Time Zone is defined as the set of places which, in local winter, have the same offset from GMT/UTC.

I believe that one current user is closely enough associated with ECMA : please ask ECMA to BUY a current copy of ISO8601 and READ it.

-- 
  (c) John Stockton, near London, UK.  Using Google, no spell-check.  |
 Mail: J.R.""""""""@physics.org - or as Reply-To, if any.             |

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2017-12-31 09:57 -0800
  Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-12-31 20:48 +0100
    Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale JJ <jj4public@vfemail.net> - 2018-01-02 04:41 +0700
      Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-01 23:37 +0100
      Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-03 02:25 +0100
        Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-03 12:55 +0100
        Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-04 04:02 -0800
          Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Martin Honnen <martin.honnen@gmx.de> - 2018-01-04 13:30 +0100
          Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-04 16:48 +0100
  Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-06 13:02 -0200
    Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-06 11:18 -0800
      Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-07 13:07 -0200
        Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-07 12:19 -0800
          Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-08 11:43 +0000
            Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-08 13:26 +0100
              Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-08 16:36 +0000
            Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-08 06:09 -0800
              Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-08 16:33 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-08 18:58 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-08 19:33 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-08 20:26 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-08 22:10 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-09 02:55 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-09 09:36 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-09 02:10 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-09 03:35 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-09 15:51 +1100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-09 13:17 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-09 14:44 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-09 14:13 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-10 17:28 +1100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-10 21:01 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-10 21:00 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-09 13:19 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-20 08:43 -0800
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-21 15:09 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-21 17:25 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-21 16:41 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-21 19:15 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-21 18:56 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-21 21:58 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-21 23:03 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-22 10:41 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-22 11:17 -0200
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-22 14:23 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-23 03:50 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-23 04:41 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-23 08:55 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-23 14:44 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-23 20:04 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-23 23:10 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-23 08:44 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-23 03:24 -0800
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-01-23 13:27 -0800
                Zulu time (was: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-24 00:44 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-24 01:37 -0200
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-24 04:57 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-24 04:10 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-24 10:19 -0200
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-25 08:20 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-25 10:26 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-25 14:26 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-26 15:42 +1100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-26 11:19 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-27 07:16 +1100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-26 23:22 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-27 10:33 +1100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-27 11:30 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-28 07:38 +1100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-27 23:47 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-28 10:07 +1100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-28 01:14 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-28 05:25 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-28 16:07 +1100
                [OT] Fallacies (was: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-28 07:18 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-24 13:51 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-24 17:13 -0200
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-23 03:00 -0800
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-23 14:14 +0000
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-23 15:44 +0100
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-23 04:24 -0800
                Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-23 14:29 +0000
  Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-23 03:19 -0800
  Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-25 13:33 -0800

csiph-web