Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8051507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:19:07+00:00 2026-06-05T07:19:07+00:00

How can compare two dates like this format var CurrDate = new Date().format(MM/dd/yyyy); if

  • 0

How can compare two dates like this format

     var CurrDate = new Date().format("MM/dd/yyyy");
     if (Date.parse("05-Jun-2012")>Date.parse(CurrDate))
        {
         alert("Please enter future date!");
         return false;
        }

please help to validate date.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T07:19:08+00:00Added an answer on June 5, 2026 at 7:19 am
    function customParse(str) {
      var months = ['Jan','Feb','Mar','Apr','May','Jun',
                    'Jul','Aug','Sep','Oct','Nov','Dec'],
          n = months.length, re = /(\d{2})-([a-z]{3})-(\d{4})/i, matches;
    
      while(n--) { months[months[n]]=n; } // map month names to their index :)
    
      matches = str.match(re); // extract date parts from string
    
      return new Date(matches[3], months[matches[2]], matches[1]);
    }
    
    customParse("18-Aug-2010");
    // "Wed Aug 18 2010 00:00:00"
    
    customParse("19-Aug-2010") > customParse("18-Aug-2010");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying to compare two dates like this ICriteria criteria = base.DataStore.TransactionScope.NHibernateSession.CreateCriteria<CcCorte>(); criteria.Add(Restrictions.Ge(Start, init.Date));
How can I compare two dates in PHP? The date is stored in the
is there a way l can compare two columns | fields in django like
I would like to know if there is anyway I can compare two columns
I have to compare a user entered date, Dt (in mm/dd/yyyy format) with the
I need to compare two dates in java. I am using the code like
I have two dates, formated like "Y-m-d H:i:s". I need to compare these two
I am trying to compare two dates but I can t see how it
I want to compare two string ignoring real time factors like date and time
Possible Duplicate: How can I compare two dates, return a number of days I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.