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 9123583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:22:31+00:00 2026-06-17T06:22:31+00:00

Ok I cant get my head round this, ive looked at so many posts

  • 0

Ok I cant get my head round this, ive looked at so many posts on SF but cant figure it out.

I need to compare two dates & times, start and end.
If end is great then alert();

Works in Chrome but not IE(9)
(format is: 01-Jan-2013 10:00)

var stDate = new Date(date +" "+ start);
var enDate = new Date(dateEnd + " "+ end);

        if ( Date.parse ( enDate ) > Date.parse ( stDate ) ) {
            alert('on no');
        }

Please help, im stuck…

  • 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-17T06:22:33+00:00Added an answer on June 17, 2026 at 6:22 am

    Just make a custom parser, it’s done faster than trying to figure how different browsers treat various time string formats:

    function parse(datestring){
        var months = {"Jan":0,"Feb":1,"Mar":2,"Apr":3,"May":4,"Jun":5,"Jul":6,"Aug":7,"Sep":8,"Oct":9,"Nov":10,"Dec":11}
        var timearray = datestring.split(/[\-\ \:]/g)
        return Date.UTC(timearray[2],months[timearray[1]],timearray[0],timearray[3],timearray[4])
    }
    

    This returns Unix time in milliseconds, and it use UTC, thus avoiding complications from the missing hour of daylight savings time. It works with the format you specified, but does not validate input.

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

Sidebar

Related Questions

I think this is a simple problem, but i just cant get my head
Hope someone can help i cant seem to get my head around this, i
This may be an extremely easy question but I can't get my head around
In theory this seems easy but I just can't get my head around this...
This is probably an easy solution but I can't get my head around it.
I can't get my head round this one. I've tried to adhere to the
I'm trying to get my head round this (okay, tbh cramming a night before
This is probably very easy but I cant get it to work as I'd
I can't get my head round why this code isn't working. http://www.goldrushme.com/views/answergarden.html JQuery dynamically
Cant get my head around how to do this. I'm wanting to set a

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.