[Koha-bugs] [Bug 17699] New: DateTime durations are not correctly subtracted

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 30 09:06:53 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17699

            Bug ID: 17699
           Summary: DateTime durations are not correctly subtracted
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: normal
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: jonathan.druart at bugs.koha-community.org
          Reporter: jonathan.druart at bugs.koha-community.org
        QA Contact: testopia at bugs.koha-community.org
        Depends on: 16911

>From DateTime::Duration pod:
"""
For positive durations, the "end_of_month" parameter defaults to wrap. For
negative durations, the default is "limit". This should match how most people
"intuitively" expect datetime math to work.
"""

Today we are Nov 30, that means $today->subtract( months => 1 ) will return Oct
31, when we usually expect Oct 30 in tests


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911
[Bug 16911] Koha::Patrons - Move ExtendMemberSubscriptionTo to ->renew_account
-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list