...
- item is overdue by 2 days and 5 hours
- item is being checked in
- applicable Overdue Fine Policy is configured to charge $5 USD per day:
...
1) Calculate overdue time in minutes:
...
2) Calculate number of minutes per interval defined in policy:
1 day * 24 hours per day * 60 minutes per hour = 1140 minutes
...
Fractional result is rounded UP: 2.2 → 3 intervals
4) Calculate fine amount:
3 intervals * 5 USD $5 = 15 USD$15