Page MenuHomePhabricator

API JSON date format
Closed, ResolvedPublic

Description

In the API JSON output for action=pagetriagestats, pagetriagestats.stats.unreviewedarticle.oldest should really be in ISO 8601 format, i.e. "YYYY-MM-DDTHH:mm:ss.sssZ". MediaWiki-format date strings require special handling and can't be directly parsed by the JavaScript Date class. In general, the core MW API outputs ISO 8601 when it's dealing with dates / timestamps and generating JSON output, the current behaviour of this extension is abnormal relative to that.

http://www.ecma-international.org/ecma-262/6.0/#sec-date-time-string-format

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 894179 had a related patch set uploaded (by MPGuy2824; author: MPGuy2824):

[mediawiki/extensions/PageTriage@master] Change date in the pagetriagestats API to the ISO-8601 format

https://gerrit.wikimedia.org/r/894179

MPGuy2824 changed the task status from Open to In Progress.Mar 5 2023, 6:09 AM
MPGuy2824 moved this task from Backlog to Code Review on the PageTriage board.

Change 894179 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] Change format of dates in the pagetriagestats API to ISO-8601

https://gerrit.wikimedia.org/r/894179