1.1 --- a/EventAggregatorSupport.py Sun Mar 29 19:19:09 2009 +0200
1.2 +++ b/EventAggregatorSupport.py Sun Mar 29 19:33:59 2009 +0200
1.3 @@ -16,6 +16,12 @@
1.4
1.5 __version__ = "0.1"
1.6
1.7 +# Date labels.
1.8 +
1.9 +month_labels = ["January", "February", "March", "April", "May", "June",
1.10 + "July", "August", "September", "October", "November", "December"]
1.11 +weekday_labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
1.12 +
1.13 # Regular expressions where MoinMoin does not provide the required support.
1.14
1.15 category_regexp = None
1.16 @@ -523,4 +529,16 @@
1.17
1.18 return page.split_title(force=1).replace("_", " ").replace("/", u" » ")
1.19
1.20 +def getMonthLabel(month):
1.21 +
1.22 + "Return an unlocalised label for the given 'month'."
1.23 +
1.24 + return month_labels[month - 1] # zero-based labels
1.25 +
1.26 +def getDayLabel(weekday):
1.27 +
1.28 + "Return an unlocalised label for the given 'weekday'."
1.29 +
1.30 + return weekday_labels[weekday]
1.31 +
1.32 # vim: tabstop=4 expandtab shiftwidth=4