[Koha-bugs] [Bug 30059] Add a JS equivalent to Koha::Patron->get_age

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 21 10:39:38 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30059

--- Comment #5 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
(In reply to Nick Clemens from comment #3)
> get_age('1979-02-17') = 43
> get_age('1979-02-18') = 43
> get_age('1979-02-19') = 43 XXX Today is 2022-02-18 - Not birthday yet! Stop
> calling me old!!!
> get_age('1979-02-20') = 42

Are you sure?

Today is 2022-02-21:
$get_age("1979-02-19") = 43
$get_age("1979-02-20") = 43
$get_age("1979-02-21") = 43 # today
$get_age("1979-02-22") = 42

So I modified the function with "var today = new Date("2022-02-18");"

$get_age('1979-02-17') = 43
$get_age('1979-02-18') = 43 # "today"
$get_age('1979-02-19') = 42
$get_age('1979-02-20') = 42

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list