]> git.evergreen-ils.org Git - Evergreen.git/commit
Add datecmp to OpenILS::Application::AppUtils.
authorJason Stephenson <jstephenson@mvlc.org>
Wed, 14 Nov 2012 15:40:35 +0000 (10:40 -0500)
committerBen Shum <bshum@biblio.org>
Tue, 18 Dec 2012 05:57:02 +0000 (00:57 -0500)
commit3b5a7dcf0f763f4665db74e7185813d221554deb
tree6b0349549f9fbe3c03824fc0d399c0090d90c5e7
parent0ad4dd6d7f856dbc5ccf6bce5f3ab74d13898396
Add datecmp to OpenILS::Application::AppUtils.

datecmp is a handy subroutine for comparing two DateTime objects or string
represenations. It returns -1, 0, and 1, much like the perl cmp operator.

If only 1 date is specified, then it will be compared to DateTime->now.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm