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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:59:47+00:00 2026-06-08T00:59:47+00:00

The following code outputs outputs NaN in Chrome while Firefox generates 1247547600000 . var

  • 0

The following code outputs outputs NaN in Chrome while Firefox generates 1247547600000.

var str = "2009/07/13 24:00:00-0500";
document.write(Date.parse(str));

See this fiddle.

How to solve this?
Thank you!

EDIT: I’ve got the data from another company. I cannot change the data it generates. So What are the suggestions here?

The data generated:

{"day":"2009-07-13", "work":["11:16:35-12:03:12", "12:32:48-13:26:28", "13:39:09-13:39:12", "13:41:03-13:41:05", "14:18:09-24:00:00"]},
{"day":"2009-07-14", "work":["00:00:00-07:22:25", "07:22:25-07:22:28", "10:10:04-10:10:31", "10:10:32-10:15:33", "10:18:07-10:21:19", "11:04:49-11:06:15", "11:12:50-11:19:05", "11:19:11-11:19:19", "11:45:50-11:51:42", "11:51:43-11:53:55", "14:03:13-14:13:04", "14:23:55-14:31:28", "14:31:28-14:38:00", "14:38:00-14:49:04", "16:34:56-16:44:33", "16:46:37-16:48:10", "16:48:11-24:00:00"]}
  • 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-08T00:59:50+00:00Added an answer on June 8, 2026 at 12:59 am

    You are asking the browser to parse an invalid time. 24:00 isn’t valid. You probably mean 0:00 of the next day. Chrome is correct in rejecting it. Firefox is simply more forgiving.

    Consider that there are 24 hours in the day. If the first hour is 00, then the last hour is 23.

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

Sidebar

Related Questions

The following code outputs the prices of some items: var $dishPrice = $(<span>).addClass(dish-price).text(topDish.price ||
The following code outputs Illegal seek: #include <stdio.h> #include <errno.h> #include <string.h> int main()
The following code outputs 1970-01-01 which is wrong. <?php $dob='17 Jan 1900'; $datetime =
I build a CodeCompileUnit and the following code outputs a C# source code file,
I have the following code which outputs an object to an XML file: using
The following code seemed really confusing to me since it provided two different outputs.The
I have the following piece of code which outputs a long article: <?php the_content();
I was surprised to find that the following code System.out.println("Character size:"+Character.SIZE/8); System.out.println("String size:"+"a".getBytes().length); outputs
The following code outputs would where we expect it to output 12/5/10 . The
The following code outputs: http://www.google.com http://www.google.com&lang What is the simplest way to change the

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.