]> git.koha-community.org Git - koha.git/commit
Bug 30059: Add JS equivalent for Koha::Patron->get_age
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 3 Feb 2022 09:31:27 +0000 (10:31 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 25 Mar 2022 00:22:10 +0000 (14:22 -1000)
commit81160bc1aea74d1d96a8ffd8b2a2b8b194bfd959
tree18bee7a76239d65522e0b7a13a3fc97b33604068
parentb752522a19b66767a041967d719504f318f7f913
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 <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-get-age.inc [new file with mode: 0644]