Patch Proposal: Adds $dow and $week (number) vars to the GMTIME var
Motivation
I needed the calendar week number and the day_of_week number in some of my applications.
Description
Adds $dow and $week (number) vars to the GMTIME variable.
Documentation
$dow |
day of week (number) ranges 0-6 |
$week |
calendar week number ranges 1-53 (ISO 8601) |
Examples
%GMTIME{
Day of week: $dow ($wday)
CW: $week
}%
Implementation
Any comments on how the patch is implemented or could be improved
Note: Patch is attached as
https://www.twiki.org/p/pub/Codev/DowAndWeekNumberInGmTime/TWiki.pm.dow-week.diff. The patch is against the svn rep #3566.
Discussion:
SMELL: Are there really two places in the code (
TWikiDotPm and
SpreadSheetPlugin) where date/time formatting happens?
BTW: This patch can easily be added to the
SpreadSheetPlugin too!
--
FranzJosefSilli - 25 Jan 2005
My colleague
AlexanderStedile patched the patch (does this make it a
patch2 ?) so that it now works fine without side effects.
--
FranzJosefSilli - 25 Jan 2005
Thanks
FranzJosefSilli. I found the bug, too, but was too busy to repair and doc it yet.
--
OliverKrueger - 27 Jan 2005
Implemented in DEVELOP r3640
--
CrawfordCurrie - 17 Feb 2005