Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

wrong Date after year 2834 #14680

Closed
baabgai opened this issue Dec 6, 2016 · 3 comments
Closed

wrong Date after year 2834 #14680

baabgai opened this issue Dec 6, 2016 · 3 comments
Labels

Comments

@baabgai
Copy link

baabgai commented Dec 6, 2016

  1. Which version of PhantomJS are you using?

    Version: 2.1.1

  2. What steps will reproduce the problem?

    1. call new Date('2900') or any date string higher than the year 2834
  3. Which operating system are you using?

    OSX 10.11.6

  4. Did you use binary PhantomJS or did you compile it from source?

    binary distribution using npm install phantomjs-prebuilt

  5. Please provide any additional information below.

The machine is configured to CET local time. Not sure if this has any impact on that specific problem.
The problem is that that any call to new Date() using a year higher than 2834 the resulting date will be off by one day

e.g. in phantomjs shell

new Date('2835') // => "2834-12-31T00:00:00.000Z"

in node (v6.4) the result looks like

new Date('2835') // => "2835-01-01T00:00:00.000Z"

in Chrome (54.0.x) the result is

(new Date('2835')).toISOString()  // => "2835-01-01T00:00:00.000Z"
@vitallium
Copy link
Collaborator

I think it's related to #14506

@baabgai baabgai changed the title wrongDate wrong Date after year 2835 Dec 6, 2016
@baabgai baabgai changed the title wrong Date after year 2835 wrong Date after year 2834 Dec 6, 2016
@vitallium
Copy link
Collaborator

Could you please try it again but with 2.5 version?

@ghost ghost removed the Web standards label Jan 10, 2018
@stale stale bot added the stale label Dec 25, 2019
@stale
Copy link

stale bot commented Dec 28, 2019

Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants