Opened 2 years ago

Last modified 2 years ago

#14132 accepted enhancement

Patch to allow WikiCalendarMacro to work with Trac 1.6, plus other stuff

Reported by: Dan Owned by: Ryan J Ollos
Priority: normal Component: WikiCalendarMacro
Severity: normal Keywords: patch
Cc: Trac Release:


I'm attaching a patch to allow running with Trac 1.5.4

Beware that some changes are related to #13847, for which I never got back to Ryan. (sorry) Therefore, this patch includes the infamous daystr=('..').join, which didn't work for him.

I also noticed this year that the month when daylight savings time happened, the days were shifted on the calendar. For example, Tuesday items appeared under Wednesday. So I modified it to make some of the calculations use noon instead of midnight, which solved the problem. I'll admit it's not exactly pretty, but it worked.

I also incidentally used this plugin on a test system with Babel installed, which I don't usually use. That also caused a problem with shifting days on the calendar, and I noticed that the Babel weekday list was probably ordered differently than the code assumed. So there is one line in a conditional that seemed to fix that problem as well.

Now that I'm using WSL, I think I understand what you're asking for regarding the locale. I'm using Ubuntu 22.4LTS as my test for Python 3 and Trac 1.5.4.


I will also attach a Python 3 update to that I use in conjunction with this macro.

Attachments (2)

wikicalendarmacro_py3_trac154_and_dst_and_babel_fixes.patch (3.5 KB) - added by Dan 2 years ago.
Patch with various updates, including Python 3. (6.0 KB) - added by Dan 2 years ago.
Blog macro that works in conjunction with the calendar macro.

Download all attachments as: .zip

Change History (3)

Changed 2 years ago by Dan

Patch with various updates, including Python 3.

Changed 2 years ago by Dan

Attachment: added

Blog macro that works in conjunction with the calendar macro.

comment:1 Changed 2 years ago by Ryan J Ollos

Owner: set to Ryan J Ollos
Status: newaccepted

Modify Ticket

Change Properties
Set your email in Preferences
as accepted The owner will remain Ryan J Ollos.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.