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


Groups > comp.lang.javascript > #9354

Re: toString Method with Parameters

From Dr J R Stockton <reply1150@merlyn.demon.co.uk>
Newsgroups comp.lang.javascript
Subject Re: toString Method with Parameters
Date 2011-12-17 20:59 +0000
Organization Home
Message-ID <pSjFNiAYKQ7OFwfO@invalid.uk.co.demon.merlyn.invalid> (permalink)
References <4g1de7t607d0sdudjmdv4mr1o4cm5hvekg@4ax.com> <9qpAjQP5i75OFw+H@invalid.uk.co.demon.merlyn.invalid> <o1vfe7l0gbc4nu2ievgf2849qk5hc66228@4ax.com> <rGMF4lGipl6OFwnw@invalid.uk.co.demon.merlyn.invalid> <74fle7tvc61qitmcrhv85mq0ovi1qpf11g@4ax.com>

Show all headers | View raw


In comp.lang.javascript message <74fle7tvc61qitmcrhv85mq0ovi1qpf11g@4ax.
com>, Thu, 15 Dec 2011 19:45:25, Gene Wirchenko <genew@ocis.net> posted:

>     I have to add and subtract months, too.  Date arithmetic can be
>rather interesting when dealing with the end of the month.  What is
>one month after September 29?  October 29.  What is one month after
>September 30?  One can argue October 30 or October 31.  I go with the
>latter.

No justification for choosing Oct 31, unless you have it in writing
signed by the Boss.  The last day of September is really October 0,
which works for all Gregorian  months.

One month ahead of August 31 is more interesting - September 30 or
October 1.  IIRC, I have a month-incrementing routine to handle that.

You should persuade the company to use ISO 8601 Week-Numbering dates
instead.  It saves a digit, and years have only two lengths in days
whereas months have four.

You probably know that an IE page can include both JavaScript and
VBscript.  VBScript has DatePart, which can give ISO 8601 Week Numbers,
and gets it right for all but 13 dates in every 400 years.  MS have
known about this for years, and have a truly horrible piece of code to
use instead.  Of course, ISO is International, which means Foreign Down
South, and true American coders don't care for foreign standards.  Any
of them who wants a standard just makes his own.

-- 
 (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk  Turnpike v6.05  MIME.
  Web  <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms and links;
  Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc.
 No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.

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


Thread

toString Method with Parameters Gene Wirchenko <genew@ocis.net> - 2011-12-12 15:04 -0800
  Re: toString Method with Parameters Andreas Bergmaier <andber93@web.de> - 2011-12-13 01:14 +0100
    Re: toString Method with Parameters Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-12-13 02:41 +0100
      Re: toString Method with Parameters Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-12-13 03:42 +0100
      Re: toString Method with Parameters Dr J R Stockton <reply1150@merlyn.demon.co.uk> - 2011-12-14 20:59 +0000
  Re: toString Method with Parameters Richard Cornford <Richard@litotes.demon.co.uk> - 2011-12-13 04:29 -0800
  Re: toString Method with Parameters Scott Sauyet <scott.sauyet@gmail.com> - 2011-12-13 10:00 -0800
  Re: toString Method with Parameters Dr J R Stockton <reply1150@merlyn.demon.co.uk> - 2011-12-13 20:42 +0000
    Re: toString Method with Parameters Gene Wirchenko <genew@ocis.net> - 2011-12-13 17:48 -0800
      Re: toString Method with Parameters Dr J R Stockton <reply1150@merlyn.demon.co.uk> - 2011-12-15 20:36 +0000
        Re: toString Method with Parameters Gene Wirchenko <genew@ocis.net> - 2011-12-15 19:45 -0800
          Re: toString Method with Parameters Dr J R Stockton <reply1150@merlyn.demon.co.uk> - 2011-12-17 20:59 +0000
            Re: toString Method with Parameters Gene Wirchenko <genew@ocis.net> - 2011-12-19 12:07 -0800
              Re: toString Method with Parameters "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-12-19 20:27 +0000

csiph-web