From 0d442bb611a2df15c8b31678f8e1c1b6be45f692 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 3 Feb 2022 10:31:27 +0100 Subject: [PATCH] Bug 30059: Add JS equivalent for Koha::Patron->get_age On bug 30055 we are going to use the REST API to display the patron search result, we will then need to calculate patron's age client-side. This is moved to its own bug report in case we need to reuse it somewhere else. Test plan: Copy/paste the JS function in your browser's console then call it and confirm that the result is correct For instance: $get_age('2000-01-01') --- .../prog/en/includes/js-patron-get-age.inc | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-get-age.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-get-age.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-get-age.inc new file mode 100644 index 00000000000..c4ab0c0cabf --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-get-age.inc @@ -0,0 +1,20 @@ + + + -- 2.25.1