From 81160bc1aea74d1d96a8ffd8b2a2b8b194bfd959 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') Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens Signed-off-by: Fridolin Somers --- .../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 0000000000..c4ab0c0cab --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-get-age.inc @@ -0,0 +1,20 @@ + + + -- 2.39.5