Koha Test Wiki MW Canasta on Koha Portainer

Test major Koha Wiki changes or bug fixes here without fear of breaking the production wiki.

For the current Koha Wiki, visit https://wiki.koha-community.org .

Dates class

From Koha Test Wiki MW Canasta on Koha Portainer
Jump to navigation Jump to search

Dates class

Status: unknown
Sponsored by: no-one
Developed by: no one
Expected for: unknown
Bug number: <bugzilla number> Bug <bugzilla number>
Work in progress repository: link(s) to currently published work on this RFC
Description: We have a Dates class but little encapsulation results, there is far too much code having to fiddle with dates. We should look to better encapsulation and reliability and give developers are more consistent interface to utilize. Handling internationalization of dates should be done in a more consistent and complete fashion. Currently we handle dates with a granularity of days. There are proposals for developments including bookings and loan periods in units less than a day so we need to handle times as well (which gives you more things you need to get right). We are making some use of perl's DateTime and anyone looking to implement dates should look at its documentation site DateTime One particular existing problem is that much of the existing code does not check fully for error conditions and invalid input.