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


Groups > comp.lang.javascript > #33400

Re: convert dob into days

Subject Re: convert dob into days
Newsgroups comp.lang.javascript
References <d839a415-1bb6-485b-a72d-ca9cd4984b52@googlegroups.com> <3168351.R56niFO833@PointedEars.de>
From Mark Lloyd <not@mail.invalid>
Message-ID <zSmVA.27368$Qg.7212@fx14.iad> (permalink)
Organization Newshosting.com - Highest quality at a great price! www.newshosting.com
Date 2017-05-24 16:24 -0500

Show all headers | View raw


On 05/24/2017 01:06 PM, Thomas 'PointedEars' Lahn wrote:

[snip]

> That aside, as you are looking for days and are rounding anyway,
> so that DST does not matter, the basic approach is correct.

There is still a possibility of an error here, if you run this 
calculation late in the day. That could be avoided by setting the time 
associated with firstDate to noon instead of the default midnight:

var firstDate = new Date(birth_year, birth_month, birth_day, 12);


[snip]


-- 
Mark Lloyd
http://notstupid.us/

"A computer without Microsoft Windows is like chocolate cake without the
mustard."

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