adiwg / mdEditor

Web application for writing metadata, an ADIwg project
https://www.mdeditor.org
GNU General Public License v3.0
44 stars 25 forks source link

Year Date Being Incorrectly Written #483

Closed dwalt closed 3 months ago

dwalt commented 2 years ago

Reported by Bethany Walker (USGS), bwalker@usgs.gov. An edit to the Resource Time Period containing a year, results in a month and day being inserted by mdEditor, resolving to a January 1 date, instead of retaining the year format. This is a result of a translation from CSDGM-mdJSON in which the date field in CSDGM is not zero filled. This is an artifact of the editor used, as format does not require zero filling. Metavist will format the yyyymmdd format as xxxx0000, while others will format it as: xxxx If translated directly from mdJSON to ISO, it works fine. If however, if the year is updated in mdEditor, the month and day gets inserted along with the year update. For instance: 1986 with an edit changing the year to 1987 would yield this result: 1987-01-01. Speculation it may be an issue with the date picker.

https://github.com/adiwg/mdEditor/issues/205 https://github.com/adiwg/mdEditor/issues/246

hmaier-fws commented 2 years ago

mdEditor should support dates entered as only a year or as a year and month. Support full ISO date/time format.

Valid ISO dates can include only a year (YYYY) or a year and month (YYYY-MM). The date selector should be updated to support the following features:

See also: #205, #246, ISO 8601 on Wikipedia