Steps to reproduce
- Specify the |date= parameter in the information template with year- or month-precision ISO 8601 format. Example
- Notice that the output HTML correctly uses the appropriate precision: <time class="dtstart" datetime="2008-02" lang="en" dir="ltr" style="white-space:nowrap">February 2008</time>
- Press the Open in Media Viewer button, and look at the Created date.
Actual result
- It reports 1 February 2008, the first day of the month it was taken in (if the specified date had a precision of year, it’d report 1 January of that year).
Expected result
- It reports February 2008, without specifying a day.
Notes
- In MultimediaViewer, newFromImageInfo() preserves the date as is (it doesn't add a day when a day isn't provided). However, formatDate() calls JavaScript's native Date constructor, which adds the missing day.
Requirements:
- Dates are preserved as is. When a month-year date is provided, do not reformat the date with a numeric day.
- Add a test, such as a missing day in the date