]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1635737 Add optional context to interval_to_seconds
authorDan Wells <dbw2@calvin.edu>
Tue, 6 Nov 2018 20:13:47 +0000 (15:13 -0500)
committerDan Wells <dbw2@calvin.edu>
Wed, 7 Nov 2018 14:09:28 +0000 (09:09 -0500)
commitac48931992bb308f308f74132618bc1fbb05ea00
tree3f29fb6740c4bf1786a6a5bfc6f7f4cdf7068d32
parent67832d8dce6fa4e8bb0c8ce70dbf8039971d63f5
LP#1635737 Add optional context to interval_to_seconds

Any given interval (e.g. "1 month") can be a different amount of
seconds depending on the context (i.e. "1 month" after February 1 is
March 1, but "1 month" after March 1 is April 1, yet March is longer
than February).  This affects months all the time, but also can
affect days, hours, and even seconds once you consider DST and "leap"
times.

By giving an optional context to interval_to_seconds, you can find
the true number of seconds in, for example, "1 month", when starting
from "February 1" (the context).

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Utils/DateTime.pm