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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:22:33+00:00 2026-06-14T19:22:33+00:00

I was playing around with JavaScript dates and I’m looking for an explanation pertaining

  • 0

I was playing around with JavaScript dates and I’m looking for an explanation pertaining to the last logged array. Why are the numbers 1352589000, 1352589395 different?

Code

var examples = [
    "Fri Jan 16 1970 10:43:09 GMT-0500 (EST)",
    1352589395
];

var text = [
    new Date((examples[0])),
    new Date((examples[1])),
];

var unix = [
    new Date((examples[0])).getTime(),
    new Date((examples[1])).getTime(),
];

console.log(examples);
console.log(text);
console.log(unix);

Output

[
  'Fri Jan 16 1970 10:43:09 GMT-0500 (EST)',
  1352589395
][
  'Fri Jan 16 1970 10:43:09 GMT-0500 (EST)' ,
  'Fri Jan 16 1970 10:43:09 GMT-0500 (EST)' 
][
  1352589000,
  1352589395
]
  • 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-14T19:22:34+00:00Added an answer on June 14, 2026 at 7:22 pm

    The numbers are in milliseconds. The difference between them is 395, which is less than half a second. The string format you’re using only goes down to the second, and so its milliseconds portion is 0, but the number you’re parsing includes the milliseconds (all 395 of them).

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

Sidebar

Related Questions

I just started javascript a few days ago and was playing around with different
So I'm playing around with JavaScript and came across what I think to be
I've been playing around with JavaScript extending its functionality but have noticed some behaviour
I was playing around with some Javascript snippets today and noticed that this code
I was playing around with javascript prototype chain inheritance and i came accross this
Possible Duplicate: Is JavaScript's Math broken? I have just started playing around with Javascript
I currently playing around with the Facebook JavaScript SDK and the Scores API (
I’m playing around with json objects in javascript and wanted see if someone could
I've been playing around with the google maps api through javascript (I'm also new
Been playing around with JavaScript, and what Im trying to do is only allow

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.