Opac: better handling of Date+time formats

Bug #1841689 reported by Jane Sandberg
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Undecided
Unassigned

Bug Description

Currently, the booking reservations display in the Public Catalog uses a sort of hacky date format (it's just the DATE_FORMAT specified in config.tt2 with some time concatenated at the end): https://github.com/evergreen-library-system/Evergreen/blob/3d6c412fbd41bb44801912982b893a4b25da9c11/Open-ILS/src/templates/opac/myopac/reservations.tt2#L19

Some Evergreen libraries use a DATE_FORMAT that includes time, which makes the reservations view repetitive. For example, a reservation might list a due date of "2019-08-03 12:23pm 12:23PM"

One solution might be to add a separate DATETIME_FORMAT option to config.tt2, which would then be used in the reservations tab. Then, if a library wanted to include a time elsewhere in the public catalog interface (say in circulation due dates), they could simply change DATE_FORMAT to DATETIME_FORMAT in the relevant .tt2 file.

Another solution would be to add separate variables that are used for specific purposes, like DUE_DATE_FORMAT, RESERVATION_DATE_FORMAT, etc., maybe with a fallback to DATE_FORMAT. Then, all the configuration could be done from config.tt2, without touching other tt2 files.

What do you all think?

Tags: booking opac
Revision history for this message
Jason Stephenson (jstephenson) wrote :

I want to note that the backend code in EGCatLoader and family will need to be made to understand these different formats.

I also want to ask if the scope of this bug is limited to booking and reservations or is the intent to expand this into the entire OPAC?

Revision history for this message
Jane Sandberg (sandbergja) wrote :

I think it would be good to have it available in the entire OPAC (or at least the myopac). For example, libraries with hourly circulations might need to display the due date with the time as well.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Christine Burns (christine-burns) wrote :

related bug = Include Time in Due Dates For Hourly Loans
- https://bugs.launchpad.net/evergreen/+bug/1813688

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.