Don't use strongly discouraged API as first example for Date

RESOLVED FIXED

Status

Developer Documentation
JavaScript
P5
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Christoph Neuroth, Unassigned)

Tracking

Details

(Reporter)

Description

2 years ago
:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: unspecified
 Technical Contact: 

:: Details

This bug report is about the `Date` documentation: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date

The page correctly states that parsing date strings with JavaScript's `Date` is "strongly discouraged due to browser differences and inconsistencies", but still the first usage examples show exactly how to do that. I would vote to remove those examples completely or at least move them closer to the warning.
Thanks, I updated the page. Usually we don't duplicate code examples, so I removed the block at the very top and added a warning banner to the same code that is in the example section.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.