Add datecmp to OpenILS::Application::AppUtils.
authorJason Stephenson <jstephenson@mvlc.org>
Wed, 14 Nov 2012 15:40:35 +0000 (10:40 -0500)
committerJason Stephenson <jstephenson@mvlc.org>
Wed, 14 Nov 2012 19:21:52 +0000 (14:21 -0500)
commita510c5a616598674b747e9b6894870874df58eea
treebd32110f425aac0a7c3d5f330a4078772ab443a3
parent224813acbb19d414e7faa4e5f4d3ab3ed0f0b420
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>
Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm