Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Date arithmetic Date: Mon, 17 Nov 2014 01:41:54 +0100 Organization: PointedEars Software (PES) Lines: 31 Message-ID: <4619702.bvc2cBK1RH@PointedEars.de> References: <111120142237479787%timstreater@greenbee.net> <6814026.8sujcrue1K@PointedEars.de> <5592bc20-5fa3-4b2d-8534-1c81d62c31a5@googlegroups.com> <5371045.XxPr97Xf0d@PointedEars.de> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1416184914 8200 eJwFwYEBwDAEBMCVXvAYh1T2H6F3rhTeMDrNn78bvY5qxwyOqSpaFrlZgpLlkbhSE6NfTvMHDdQQiw== (17 Nov 2014 00:41:54 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 17 Nov 2014 00:41:54 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwNyMcBwCAMA8CVcBPROLiw/wjknhcGQW1HwOPGFRa6Z3yGh2PMb9WcP0Hk0qg2r71DiavaCaZIa0PKjuUDeMkWKQ== Cancel-Lock: sha1:P8B0YT3rA3AbRq980uIyXIlvy90= X-NNTP-Posting-Host: eJwNwoERwEAEBMCWCI4vx33ov4RkdsOguOkIeGxs361zJ9PIrvzR51EhKNpqkoNTM4hcvmIfKAQROg== Xref: csiph.com comp.lang.javascript:26153 Christoph M. Becker wrote: > Thomas 'PointedEars' Lahn wrote: >> Dr J R Stockton wrote: >>> It has already been stated twice (at least) in this thread that for this >>> use-case the approach in jsx.date.getDayOfYear() is not the most >>> efficient one, and that the division approach is probably the best one. >>> After all, it was Christoph who suggested it first, in this thread at >>> least. > > That is not correct. It has been Evertjan to first suggest the division > in this thread[1] (if I'm not mistaken). According to my newsreader, you are correct. But it was not his suggestion I was referring to with “division approach”: > My suggestion was meant to avoid any potential DST related issues, and to > stick with proper integer calculations (what might be somewhat dangerous > considering that ECMAScript Numbers are floating point values). > > [1] See my clarification in , which will probably have been distributed to you at the time you read this message. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not Cc: me. / Bitte keine Kopien per E-Mail.