check for invalid date

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew Poulos

    #1

    check for invalid date

    If I check for a invalid date e.g. February 30th, 2008?

    Andrew Poulos
  • RobG

    #2
    Re: check for invalid date

    On Feb 15, 9:23 am, Andrew Poulos <ap_p...@hotmai l.comwrote:
    If I check for a invalid date e.g. February 30th, 2008?
    Try something from here:

    <URL: http://www.merlyn.demon.co.uk/js-date4.htm#DVal >


    --
    Rob

    Comment

    • Dr J R Stockton

      #3
      Re: check for invalid date

      In comp.lang.javas cript message <47b4cd6e$0$202 16$5a62ac22@per-
      qv1-newsreader-01.iinet.net.au >, Fri, 15 Feb 2008 10:23:49, Andrew
      Poulos <ap_prog@hotmai l.composted:
      >If I check for a invalid date e.g. February 30th, 2008?
      Reading the newsgroup FAQ with care should help you, provided that the
      version you choose is not too recent.

      Since new Date() accepts both "13/11/2008" and "11/13/2008", one
      cannot rely solely on new Date() . Indeed, even if you try all
      browsers that you have, you still cannot rely on it, as date string
      formats are not specified in ISO/IEC 16262.

      You will, therefore, need to know something about the possible formats
      that you may encounter - for example, will the month always be a word
      rather than a number? May it be abbreviated? How much?

      XP sp2 IE6 accepts new Date("Ju 30th, 2008") giving July 30th.

      Read <URL:http://www.merlyn.demo n.co.uk/js-date4.htm>.

      It's a good idea to read the newsgroup c.l.j and its FAQ. See below.

      --
      (c) John Stockton, nr London UK. ?@merlyn.demon. co.uk IE6 IE7 FF2 Op9 Sf3
      news:comp.lang. javascript FAQ <URL:http://www.jibbering.c om/faq/index.html>.
      <URL:http://www.merlyn.demo n.co.uk/js-index.htmjscr maths, dates, sources.
      <URL:http://www.merlyn.demo n.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.

      Comment

      Working...