Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Dr J R Stockton Newsgroups: comp.lang.javascript Subject: Re: What is wrong with this If Else construction? Date: Tue, 27 Dec 2016 22:36:54 +0000 Organization: Home Lines: 21 Message-ID: <7dCHSnIG0uYYFw85@invalid.uk.co.demon.merlyn.invalid> References: <47744619-426f-4af1-8376-e2935a2570db@googlegroups.com> <2ee99c33-38ae-4097-b847-c3b7fc6ad63d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="2ab51c815ee873e4425f07d63bdfdd95"; logging-data="15908"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+opUwCWBKG0y3EBChVDtGIi6ft15AqLOo=" User-Agent: Turnpike/6.05-S () Cancel-Lock: sha1:oqG+/aMaxXNsDx4YM8tAY7RgRxg= Xref: csiph.com comp.lang.javascript:32002 In comp.lang.javascript message , Mon, 26 Dec 2016 14:12:05, Gene Wirchenko posted: > I do not know DateSerial(), but this code has a possible smell of >not handling a leap year correctly. What happens if the person was >born on Leap Day and dies in a non-leap year? (Will DateSerial() >throw an error or otherwise malfunction? One must consider the purpose of the code, and from that what the answer should be in awkward cases. So, if this is required for legal purposes, one must know the legal definition in the applicable jurisdiction. It is entirely possible that the "correct" answer may vary between US & CA and MX, or even between US states and other territories. -- (c) John Stockton, Surrey, UK. ¬@merlyn.demon.co.uk Turnpike v6.05 MIME. Merlyn Web Site < > - FAQish topics, acronyms, & links.