content icon indicating copy to clipboard operation
content copied to clipboard

Link to ECMAScript epoch from Date.now()

Open codyatwork opened this issue 3 years ago • 2 comments

Summary

Replaces the text "January 1, 1970 00:00:00 UTC" on the Date.now() page with a link to the ECMAScript epoch.

Motivation

This allows the reader to easily find more information about the epoch and makes this page consistent with Date.prototype.getTime(). I noticed this inconsistency when I was looking at both pages to see if these functions return the same kind of timestamp and had to click through to the epoch page to be sure that they were referencing the same time.

Supporting details

Related issues

Metadata

  • [ ] Adds a new document
  • [ ] Rewrites (or significantly expands) a document
  • [ ] Fixes a typo, bug, or other error

codyatwork avatar Aug 10 '22 09:08 codyatwork

I guess this is blocked on https://github.com/mdn/content/pull/17096?

sideshowbarker avatar Nov 07 '22 08:11 sideshowbarker

Yes, it is

Josh-Cena avatar Nov 07 '22 13:11 Josh-Cena

Preview URLs

External URLs (3)

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Date Title: Date

(this comment was updated 2022-11-21 20:53:23.908715)

github-actions[bot] avatar Nov 21 '22 20:11 github-actions[bot]

I've opted for the term "epoch" instead of "ECMAScript epoch". (In the end I did not use any content from #17096.) It's a pretty minor change, but would be helpful to get a second pair of eyes. @wbamberg?

Josh-Cena avatar Nov 21 '22 20:11 Josh-Cena