date function

Results 1 to 2 of 2

Thread: date function

  1. #1
    Join Date
    Dec 1969

    Default date function

    any body knows how to compare 2 dates in javascript?

  2. #2
    Join Date
    Dec 1969

    Default Happens automatically...

    If you have two JS Date objects (see the reference materials for how to create a JS Date instance), then you just compare them as you would a pair of numbers, a pair of strings, etc.<BR><BR>Thus:<BR><BR><BR>var d1 = new Date("1/3/2002");<BR>var d2 = new Date("2/28/2001");<BR>if ( d1 &#062; d2 ) ...<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts