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

--- Comment #3 from Marcel de Rooy <[email protected]> ---
Created attachment 63471
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63471&action=edit
Bug 18356: Fix date calculations for yearly frequencies in Serials

The problem as described on BZ 18356 is a combination of an error in
GetFictiveIssueNumber and GetNextDate for unit==year.

In GetFictiveIssueNumber the year should be decreased by one if you have
more units per year and you did not yet reach firstacqui day and month.
This affects calculations in GetNextDate with irregularities.

In GetNextDate the Add_Delta_YM calculation should be applied only to
frequencies based on years per unit.
In the case of multiple units per year we calculate the number of days to
add. And if we have reached the end of a year cycle, we 'round' up to
firstacqui day and month as long as we are close enough. Otherwise we just
add the number of calculated days, since we can safely assume that the
publish dates have been adjusted manually.

Test plan:
[1] Verify that both GetNextDate.t as well as GetFictiveIssueNumber.t pass.
[2] Look at the prediction pattern for a few frequencies.
    For example: 1 iss/y, 1 iss/2y, 5 iss/y.

Signed-off-by: Marcel de Rooy <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
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