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


Groups > comp.lang.javascript > #33414

Re: convert dob into days

Newsgroups comp.lang.javascript
Subject Re: convert dob into days
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References (3 earlier) <3278626.MHq7AAxBmi@PointedEars.de> <tFpVA.38624$8c1.28455@fx19.iad> <1695443.taCxCBeP46@PointedEars.de> <MtFVA.170554$Dm2.37866@fx44.iad> <eaa19889-7471-4153-a7cc-a80d496fec1d@googlegroups.com>
Date 2017-05-26 09:12 +0200
Message-ID <XnsA7815D9D8BE69eejj99@194.109.6.166> (permalink)

Show all headers | View raw


Dr J R Stockton <J.R.Stockton@physics.org> wrote on 26 May 2017 in
comp.lang.javascript: 

> On Thursday, May 25, 2017 at 7:35:31 PM UTC+1, Mark Lloyd wrote:
> 
> 
>> If setting the time to noon could cause an error in Absurdistan[tm] 
>> (proximity of DST change to default time), leaving the time set to 
>> midnight could cause an error in any REAL place that does the DST 
>> changes around midnight (some timezones in Europe do).
> 
> Only in zones to the West of all of the mainland ones, since European
> clocks change at 01:00 UTC.  Is there actually more than one such zone
> with use of Summer Time? 
> 

All this is missing point of the OQ.

If you are comparing a birth-DATE to now-DATETIME the birth-TIME is missing, 
so the exact number of [totally past?] days in the sense of number of 24-
hour periods seems ill-defined.

So I would either simply convert now-DATETIME to now-DATE and then compare 
the 2 dates as UTC/GMT-dates, as that lacks summer-time shift,

OR would add the time of birth as an input and specify the "time-zone" of 
both date-times seperately [as why should they always be the same?].

As mentioned, the simple substraction of two date-times autoconverts to the 
number of miliseconds difference.



-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

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


Thread

convert dob into days negisunny38@gmail.com - 2017-05-24 09:58 -0700
  Re: convert dob into days "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-05-24 19:16 +0200
    Re: convert dob into days negisunny38@gmail.com - 2017-05-24 10:31 -0700
      Re: convert dob into days "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-05-24 23:08 +0200
    Re: convert dob into days Mark Lloyd <not@mail.invalid> - 2017-05-24 16:33 -0500
      Re: convert dob into days "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-05-25 16:29 +0200
  Re: convert dob into days Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-24 20:06 +0200
    Re: convert dob into days Mark Lloyd <not@mail.invalid> - 2017-05-24 16:24 -0500
      Re: convert dob into days Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-25 01:00 +0200
        Re: convert dob into days Mark Lloyd <not@mail.invalid> - 2017-05-24 19:35 -0500
          Re: convert dob into days Jon Ribbens <jon+usenet@unequivocal.eu> - 2017-05-25 11:27 +0000
          Re: convert dob into days Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-25 13:45 +0200
            Re: convert dob into days Mark Lloyd <not@mail.invalid> - 2017-05-25 13:35 -0500
              Re: convert dob into days Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-26 00:35 +0200
              Re: convert dob into days Dr J R Stockton <J.R.Stockton@physics.org> - 2017-05-25 15:45 -0700
                Re: convert dob into days "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-05-26 09:12 +0200
            Re: convert dob into days Dr J R Stockton <reply1700@merlyn.demon.co.uk.invalid> - 2017-05-26 18:40 +0100
              Re: convert dob into days Sam E <why.should.this@be.email.invalid> - 2017-05-27 10:14 -0500
  Re: convert dob into days Dr J R Stockton <J.R.Stockton@physics.org> - 2017-05-24 14:36 -0700

csiph-web