Tags:
create new tag
, view all tags

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 http://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! wink

-- 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

 
Topic attachments
I Attachment Action Size Date Who Comment
Unknown file formatdiff TWiki.pm.dow-week.diff manage 1.6 K 2005-01-25 - 15:41 UnknownUser patched diff against svn #3566 (main)
Topic revision: r8 - 2005-02-17 - CrawfordCurrie
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.