]> git.evergreen-ils.org Git - contrib/Conifer.git/commit
LP#1594937 Fix off-by-one display of closed dates
authorDan Scott <dscott@laurentian.ca>
Mon, 12 Dec 2016 21:13:00 +0000 (16:13 -0500)
committerDan Scott <dscott@laurentian.ca>
Mon, 12 Dec 2016 21:18:46 +0000 (16:18 -0500)
commit8df0581a3b83f3f636938c3c837339b6d5c6277f
treeee53470733f990559f1bcf2975856e8eb54153fa
parent99d2c3e94846e194b7129776eabd2120689f6b42
LP#1594937 Fix off-by-one display of closed dates

The switch to toISOString() to format dates introduced an off-by-one error in
the closed dates display, showing one extra day of closure due to the timezone
being ignored in toISOString().

toLocaleDateString() is the future of locale-sensitive date formats. In XUL,
because it is an old version of Firefox, it lacks locale sensitivity, but for
the purposes of the web staff client it's a good base to build on as even
Internet Explorer supports the locale and options arguments as of IE 11.

And for the immediate purposes of showing the right dates in the closed dates
editor, it works.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/xul/staff_client/server/admin/closed_dates.js