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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:45:10+00:00 2026-05-25T16:45:10+00:00

I am using date.js in my project, and I am encountering something I didn’t

  • 0

I am using date.js in my project, and I am encountering something I didn’t expect with respect to dates that had time components of exactly noon or exactly midnight.

When I use the native javascript Date.parse method, I get the result I expected when parsing a date:

// plain old javascript
var date = new Date(Date.parse("10/21/2010 12:00:00 PM"));
alert(date);

I get this:

Thu Oct 21 2010 12:00:00 GMT-0500 (Central Daylight Time)

I interpret this as noon on October 21, 2010, which is what I think my input date is. However, when I import date.js and try something similar,

// using date.js
var date = Date.parseExact("10/21/2010 12:00:00 PM", "M/d/yyyy hh:mm:ss tt");
alert(date);

I get this:

Fri Oct 22 2010 00:00:00 GMT-0500 (Central Daylight Time)

This looks to me like midnight on the following day. I have no idea why it’s interpreting this as midnight, or at any rate why it’s interpreting this differently than the default Date.parse in javascript. Am I confused over the meaning of 12:00 PM? Am I misusing date.js’s parseExact?

  • 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-25T16:45:11+00:00Added an answer on May 25, 2026 at 4:45 pm

    Looks like a version issue:

    http://jsfiddle.net/4QK8Q/
    http://jsfiddle.net/JKg3n/

    The first one is your file (from the google code base), the second is from their website (datejs.com). Funnily enough they look like the same version, but obviously aren’t. I’m not familiar enough with the library to tell what’s going on, but I suggest filing a bug report.

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

Sidebar

Related Questions

I've been using Javascript's Date for a project, but noticed today that my code
I coded something using Date statement in Access VBA. It was working fine until
Is there any reason behind using date(January 1st, 1970) as default standard for time
I am trying to output dates in the Italian format using date() as follows:
i have one problem when i sort the NSMutablearray using date and time wise.
when using new Date,I get something like follows: Fri May 29 2009 22:39:02 GMT+0800
I'm using a database in my Java project and I want to store date
Im using DatePicker plugin for a project. But I want to Disable dates older
I am using core data to store objects for my project.There is a date
I am using jquery date picker in rails project, I want to disable 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.