[OPEN-ILS-DEV] DateTime::Format::Duration

Victoria Lewis vLewis at catalystitservices.com
Tue Jun 9 16:55:42 EDT 2015


Hello,
Thank you for the responses.

The following line worked. 

$duration->in_units('days')  

I was able to remove the DateTime::Format::Duration dependency. 
Thanks
Victoria Lewis

 -----Original Message-----
From: Open-ils-dev [mailto:open-ils-dev-bounces at list.georgialibraries.org] On Behalf Of Galen Charlton
Sent: Friday, June 5, 2015 12:30 PM
To: Evergreen Development Discussion List
Subject: Re: [OPEN-ILS-DEV] DateTime::Format::Duration

Hi,

On Fri, Jun 5, 2015 at 3:02 PM, Victoria Lewis <vLewis at catalystitservices.com> wrote:
> I want to find the difference in days between two dates.
[snip]
> my $duration = $date->delta_days($last_date_entered);

If you just need the value, you can use $duration->in_units('days').

Regards,

Galen
--
Galen Charlton
Infrastructure and Added Services Manager Equinox Software, Inc. / The Open Source Experts
email:  gmc at esilibrary.com
direct: +1 770-709-5581
cell:   +1 404-984-4366
skype:  gmcharlt
web:    http://www.esilibrary.com/
Supporting Koha and Evergreen: http://koha-community.org & http://evergreen-ils.org


More information about the Open-ils-dev mailing list