/    Sign up×
Community /Pin to ProfileBookmark

If my understanding of the JS date variable is correct it stores dates as the number of milliseconds since 01/01/1970. Does this mean that in order to store and manipulate older dates I will have to create my own class rather than relying on the JS.date object

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Orc_ScorcherJan 22.2007 — Have you tried it? Dates before 1970 simply use negative numbers. For example Dec 31, 1969 23:59:59 UTC is stored as -1000.
Copy linkTweet thisAlerts:
@FredAtauthorJan 22.2007 — Have you tried it? Dates before 1970 simply use negative numbers. For example Dec 31, 1969 23:59:59 UTC is stored as -1000.[/QUOTE]

Yes, I figured that out after I had posted the query. Nevertheless, a rather odd choice - 01/01/1970
Copy linkTweet thisAlerts:
@LeeUJan 22.2007 — Nevertheless, a rather odd choice - 01/01/1970[/QUOTE]
I's called "epoch time" or "unix time".
×

Success!

Help @FredAt spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...