content icon indicating copy to clipboard operation
content copied to clipboard

Delete DOMTimestamp and EpochTimestamp

Open teoli2003 opened this issue 3 years ago • 7 comments

These are not real interfaces but a kind of WebIDL-only typedef. We wanted to remove them for a long time.

This PR adapts all occurrences of DOMTimestamp and EpochTimestamp.

This is part of the cleaning needed for having the whole of Web/API covered with page-type: YAML headers. (See #16255)

teoli2003 avatar Jun 08 '22 06:06 teoli2003

Preview URLs (17 pages)
Flaws (53)

Note! 11 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/Document_Object_Model Title: Document Object Model (DOM) Flaw count: 45

  • macros:
    • /en-US/docs/Web/API/NodeFilter redirects to /en-US/docs/Web/API/Document/createNodeIterator
    • /en-US/docs/Web/API/SVGFilterPrimitiveStandardAttributes does not exist
    • /en-US/docs/Web/API/SVGHatchElement does not exist
    • /en-US/docs/Web/API/SVGHatchpathElement does not exist
    • /en-US/docs/Web/API/SVGColor does not exist
    • and 40 more flaws omitted

URL: /en-US/docs/Web/API/RTCPeerConnection/generateCertificate Title: RTCPeerConnection.generateCertificate() static function Flaw count: 4

  • macros:
    • /en-US/docs/Web/API/AlgorithmIdentifier does not exist
    • /en-US/docs/Web/API/Algorithm does not exist
    • /en-US/docs/Web/API/RTCCertificateExpiration does not exist
    • /en-US/docs/Web/API/Algorithm does not exist

URL: /en-US/docs/Web/API/CookieStore/set Title: CookieStore.set() Flaw count: 1

  • macros:
    • /en-US/docs/Glossary/serialize redirects to /en-US/docs/Glossary/Serialization

URL: /en-US/docs/Web/API/Geolocation_API/Using_the_Geolocation_API Title: Using the Geolocation API Flaw count: 1

  • macros:
    • The fourth to sixth parameters of 'EmbedLiveSample' are deprecated

URL: /en-US/docs/Mozilla/Firefox/Releases/54 Title: Firefox 54 for developers Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/WorkerGlobalScope/close redirects to /en-US/docs/Web/API/DedicatedWorkerGlobalScope/close

URL: /en-US/docs/Mozilla/Firefox/Releases/23 Title: Firefox 23 for developers Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/HTMLMediaElement/initialTime does not exist
External URLs (2)

URL: /en-US/docs/Glossary/Unix_time Title: Unix time

(this comment was updated 2022-11-15 01:08:40.831579)

github-actions[bot] avatar Jun 08 '22 06:06 github-actions[bot]

@wbamberg I created the glossary entry (which will work for the high-resolution timestamp too) and updated the sentence.

(I had to do a force push, sorry...)

teoli2003 avatar Jun 27 '22 10:06 teoli2003

Hi @teoli2003 I was about to update this one from main but there's a few conflicts, do you want to take a look? 😄

bsmth avatar Oct 05 '22 12:10 bsmth

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Nov 07 '22 10:11 github-actions[bot]

@teoli2003 This needs a rebase and remaining fixes. Would be great to get in.

hamishwillee avatar Nov 08 '22 01:11 hamishwillee

@hamishwillee , I think @Elchi3 and I are going to have to take care of this anyway as part of the work on the Performance API: https://github.com/openwebdocs/project/issues/62.

wbamberg avatar Nov 08 '22 02:11 wbamberg

Many typedefs probably need no page in the Web/API/ reference. Some (like these two) probably need a glossary page or some docs somewhere. It would be nice to have a plan about typedefs generally. I opened a discussion: https://github.com/mdn/mdn-community/discussions/282

Elchi3 avatar Nov 11 '22 13:11 Elchi3

@wbamberg Re https://github.com/orgs/mdn/discussions/282#discussioncomment-4141217

other specs - it is generally a unix epoch timestamp, but it doesn't have to be.

This I don't understand though, I thought DOMTimeStamp was replaced with EpochTimeStamp (according to https://developer.mozilla.org/en-US/docs/Web/API/DOMTimeStamp, and also features like https://developer.mozilla.org/en-US/docs/Web/API/Notification/timestamp, which we document as using DOMTimeStamp, but the spec uses EpochTimeStamp: https://notifications.spec.whatwg.org/#timestamp).

See the note in DOMTimeStamp:

image

So yes, it has been removed and renamed in one spec, but it still gets reference in others. Lazy Hamish says it probably doesn't matter all that much - ie. those other specs are not all that important. But I have not done the investigation.

hamishwillee avatar Nov 14 '22 23:11 hamishwillee

I've fixed the merge conflicts here and made the changes I recommended in my own review :). So this PR now does three things:

  • adds a new glossary entry "Unix time"
  • deletes the pages for DOMTimeStamp and EpochTimeStamp, and made them redirect to the glossary entry
  • changes all links to DOMTimeStamp and EpochTimeStamp to links to the glossary entry

After this there are no references to DOMTimeStamp or EpochTimeStamp on MDN.

This doesn't yet tackle DOMHighResTimeStamp - I think that does not belong in a "Unix time" glossary entry, but in a bit of guide material for the Perf APIs, and it will be cleaner to do it in a different PR. When we do that, we should update the glossary entry to point lost people at this new guide material, like "if you are looking for high-res (sub-millisecond) timestamps used in the perf APIs, see XYZ".

wbamberg avatar Nov 15 '22 00:11 wbamberg