http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7849

Kyle M Hall <kyle.m.h...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA

--- Comment #4 from Kyle M Hall <kyle.m.h...@gmail.com> ---
Unfortunately, I'm having some problems with testing this code. Using
$duration->days() only returns the number of days, not the length of time in
days. So an item that is overdue 2 months will show a days of 0. I had thought
in_units might work, but it does not appear to work either.

>From CPAN:
Returns the length of the duration in the units (any of those that can be
passed to new) given as arguments. All lengths are integral, but may be
negative. Smaller units are computed from what remains after taking away the
larger units given, so for example:

  $dur->in_units( 'years' );            # 2
  $dur->in_units( 'months' );           # 27
  $dur->in_units( 'years', 'months' );  # (2, 3)
  $dur->in_units( 'weeks', 'days' );    # (0, 0) !

The last example demonstrates that there *will not be any conversion between
units which don't have a fixed conversion rate*.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to