[issue2551208] Calender 'next month' link fails on day 31 of a month
Ralf Schlatterbeck <[email protected]> Wed, 01 Jun 2022 08:40:42 +0000
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
New submission from Ralf Schlatterbeck:
The function html_calendar in roundup/cgi/templating.py produces a help link that pops up a calendar for date selection.
This computes navigation links in the calendar:
date_prev_month = display + date.Interval("-1m")
date_next_month = display + date.Interval("+1m")
This fails on day 31 of a month due to limitations in our Date/Interval classes:
>>> from roundup import date
>>> d = date.Date ('2022-05-31')
>>> d + date.Interval ('+1m')
<Date 2022-07-01.00:00:00.000>
>>> d + date.Interval ('-1m')
<Date 2022-05-01.00:00:00.000>
Maybe that should be fixed by explicitly incrementing only the month of the given date.
On the other hand it only happens every two months :-)
----------
messages: 7550
nosy: rouilj, schlatterbeck
severity: normal
status: new
title: Calender 'next month' link fails on day 31 of a month
_________________________________________________
Roundup tracker <[email protected]>
<https://issues.roundup-tracker.org/issue2551208>
_________________________________________________