Path: csiph.com!2.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: OT: Leap year bug in Excel (was: What is wrong with this If Else construction?) Date: Mon, 26 Dec 2016 17:12:22 +0100 Organization: solani.org Lines: 31 Message-ID: References: <47744619-426f-4af1-8376-e2935a2570db@googlegroups.com> <58613e92$0$21413$e4fe514c@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1482768707 12482 eJwFwYERAEEEA8CWckjQDj/6L+F36XraDFHB490Hy+LaAAkJnYreY1eAjZo5enav2fjwB/3PD/M= (26 Dec 2016 16:11:47 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 26 Dec 2016 16:11:47 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 Cancel-Lock: sha1:mlXUstAkl13LkfVGR5vVpJLQGFA= In-Reply-To: <58613e92$0$21413$e4fe514c@news.xs4all.nl> X-NNTP-Posting-Host: eJwFwQkBACAIA8BKPA41Dg7oH8E7eGhwr0AsDMac8poTpVJX+KbSYN1H8urJw12tSSVcLOsDNcsSAQ== X-User-ID: eJwFwYcBwDAIA7CXGGbkHELr/0+IFJ6aW8hIBIMC79mmTWH20AlFa5+WuaXiIebp1/aL+SkPDXgQkg== Xref: csiph.com comp.lang.javascript:31973 On 26.12.2016 at 17:00, Luuk wrote: > On 26-12-16 14:46, Stefan Ram wrote: > >> bart.smissaert@gmail.com writes: >> >>> New to JavaScript and trying to calculate the date of birth >>> from an Excel date, provided as an integer value (1 Jan 1900 >>> = 1). >> >> IIRC, Excel had or has a leap day in 1900. So, it is >> >> 58 1900-02-27 00:00 >> 59 1900-02-28 00:00 >> 60 1900-02-29 00:00 >> 61 1900-03-01 00:00 >> 62 1900-03-02 00:00 >> >> in Excel (or /was/in older versions of Excel?). But 1900 was >> /not/ a leap year. Conversion software might have to take >> this into account. >> > > hmm, just tested, this bug still exists in excel 2013 > (and proably will be fro some time , because of backward compatability) See . -- Christoph M. Becker