LP#1594937 Fix off-by-one display of closed dates user/csharp/lp1594937_closed_dates_off_by_one_display
authorDan Scott <dscott@laurentian.ca>
Mon, 12 Dec 2016 21:13:00 +0000 (16:13 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 13 Dec 2016 11:06:57 +0000 (06:06 -0500)
commit1445fdd093a3f77c0a14b94b39bd9e7714578978
tree4b791da03f9c43067be6b1f79dc9b837ffa6d3a0
parent18c0241d4f8cc590f89070f767b786d58c312951
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>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/xul/staff_client/server/admin/closed_dates.js