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

  • Home
  • SEARCH
  • 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 949329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:23:14+00:00 2026-05-15T23:23:14+00:00

I am using Javascript Date.parse() to check if a start time is after an

  • 0

I am using Javascript Date.parse() to check if a start time is after an end time.

The time in question is like this:

Date.parse("12:00pm") > Date.parse("9:30pm")

In Chrome this is coming up as false (as it should)

In IE it is incorrectly coming up as true.

The values Chrome see’s are:

Thu Jul 22 2010 12:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jul 22 2010 21:30:00 GMT-0400 (Eastern Daylight Time)

The values IE sees are:

Thu Jul 22 12:00:00 EDT 2010
Thu Jul 22 09:30:00 EDT 2010

How can I make IE work correctly?

update

OK this is only happening in IE7. Also I see now IE7 is not getting the am/pm which is stored in a SELECT box and retrieved via:

var startMerid = document.getElementById("start_time_ampm").options[document.getElementById("start_time_ampm").selectedIndex].value;

My select was like this:

<option>am</option>

but I changed to:

<option value="am">am</option>

and it now works.

  • 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-05-15T23:23:14+00:00Added an answer on May 15, 2026 at 11:23 pm

    The docs for Date.parse() in IE state the following:

    If the 24-hour clock is used, it is an error to specify “PM” for times later than 12 noon. For example, “23:15 PM” is an error.

    For a cross-browser solution, you should avoid parse() and parse the time string manually. Alternatively, you could use a cross-browser library for parsing dates/times – DateJS is a popular one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Javascript's Date object to parse a string into a milliseconds timestamp. I'm
Using javascript, How can I convert a human time string like Wed Jun 20
i am using date.js to parse date in my javascript code i just found
How to parse a string into a date object at JavaScript (without using any
I have these two date time variables in javascript: first_date = Date.parse('05/21/2012 0:00:00 ');
When initializing a new Date object in JavaScript using the below call, I found
Using JavaScript I open the pop window and parent window is inactive at this
Using JavaScript, how do I create an HTML table that can "accept" numeric matrix
Using Javascript, I would like change the background color of the numbers in an
I lost a lot of time on this one, so I'm posting the question

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.