Tags:
create new tag
, view all tags

QuickCalendarPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on QuickCalendarPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback on QuickCalendarPlugin

What it's for

  • Ultimately this is part of a time management plugin that I've hacked up to track my work weeks (using work weeks is a habit I picked up from that big company which makes pentiums).
  • Users basically have their own calendars which link to individual work week or day topics, which allow simple self-tracking of tasks & etc. so when your boss asks how you're doing, you forward a complete spreadsheet for the past month with tabular hours and billing factors per project (to which s/he responds, "um, I guess that answers my question!"

# This plugin is meant to comply with
# ISO 8601: Standard for International Date and Time Notation
#
# with the following methods:
#   1.  year numbers are always 4-digit
#   2.  week numbers are always 2-digit
#   3.  month numbers are always 2-digit
#   4.  day numbers are always 2-digit
#   5.  quarter numbers are always single digit
#   6.  year-week format is YYYYwWW as in "2003w51"
#   7.  year-month-day format is YYYYMMDD as in "20030930"
#   8.  day-of-year numbers are 1..366
#   9.  year-quarter format is YYYYqQ as in "2003q4", where Q is 1 to 4:
#      - quarter 1 includes Jan, Feb, Mar
#      - quarter 2 includes Apr, May, Jun
#      - quarter 3 includes Jul, Aug, Sep
#      - quarter 4 includes Oct, Nov, Dec
#
# Especially ambiguous are week numbers.
#  Week numbers range 01 .. 53 and all years have at least week 52.
# Note though that POSIX strftime function has multiple representations
#   of the week number, either: 
#      - 00-53 where the first Sunday of the year indicates week 1
#      - 00-53 where the first Monday of the year indicates week 1
#      - 01-53 where week 1 is indicated by the number of days in the first
#      week of the year, i.e. week 1 is indicated by Jan 4th or the first
#      Thursday.
#   This plugin uses 01-53 where week 1 is Jan 1.
# All I can say is, dammit, I just wanted to write a simple plugin.
#
# Reference:
# http://www.cl.cam.ac.uk/~mgk25/iso-time.html
# and "calendar FAQ" (search on google)
# and http://sciastro.astronomy.net/sci.astro.3.FAQ 
#       [sci.astro] Time (Astronomy Frequently Asked Questions)

Known Issues

  • v1.100
    • typo bug in calculating current quarter fixed v1.210
    • work week calculation off by one fixed v1.210, but not julian; still broken
    • global var used in calc by mistake prevented any other y/m from calculation fixed v1.210
    • anchoring used single digit numbers fixed v1.210
    • anchoring used day number instead of YYYYMMDD changed v1.210
  • v1.210
    • Useless use of a constant in void context at line 367. severity: cosmetic fixed v1.211
    • Useless use of a variable in void context at line 284. severity: cosmetic fixed v1.211
    • poor argument parsing fixed v1.300
    • work week calculation not julian kinda fixed v1.300
  • v1.220
    • work week calculation not julian (to be fixed) kinda fixed v1.300
    • work week rendering non iso std fixed v1.300

To Do Feature List for future versions

  • incorporate the rest of the calendar management stuff
    • auto-nav buttons (prev/next month/year) - requires persistence
    • handle args in variable expansion
      • month, year, relative - added in v1.210
      • week, qtr
      • style formatting: colors, size, etc.? - started in v1.220
  • use css?
  • fixup linkification (link using wikiUserName prefixes) - added in v1.220
  • fork into the time-management stuff
    • integrate with edittableplugin and spreadsheetplugin
    • add templates
    • add seperate web
  • better anchoring in TWiki (see FragmentIdentifierWikification)
  • use localization (for month names)

Comments Appreciated

Nice to see more and more Plugins. Plugin development scales smile

-- PeterThoeny - 23 Aug 2003

I followed the installation instructions but %CAL% doesn't turn into a calandar.

-- SimonHardyFrancis - 04 Sep 2003

Thanks to WillNorris for enhancements in v1.220.

-- JonathanCline - 29 Sep 2003

Is there a demo somewhere?

-- MartinCleaver - 11 Oct 2003

Apache 2.0 may hang if you put more than 6 (;&gt 6) %CAL% in one page. This dose not occurred on apache 1.3. The solution is TWikiOnApache2dot0Hangs, i.e., add one of the following lines in your twiki/bin/setlib.cfg.

open(STDERR, ">>/dev/null");         # throw away cgi script errors, or
open(STDERR, ">>/tmp/error.log");    # redirect errors to a log file of choice

I tried to use $This{'displayQtr'} to generate the correct quarter, but it didn't work. Add the following lines in lin 457, i.e., between the last } &

$out ...
.
    # Handle Qtr argument
    $Static{'thisQtr'} = POSIX::ceil($This{'displayMonth'} / 3); # 1 .. 4
    $This{'displayQtr'} = $Static{'thisQtr'};

I have been using Tavi:TaviPatches/Calendar, and OddMuse:Calendar_Extension for sometimes, and all of them have some characteristics that are great.

  1. Display a variable number of months in past and future in only one %CAL%, like in OddMuse calendar:2003 generate a full calendar of year 2003.
  2. Different colors for days with different events/categories, holidays, weekends, and today. (Cooperate with CSS for better/easier color handling). A better way to differ pages that are exists.
  3. List upcoming events below the calendar, this may be work using websearch.

-- ThYang - 16 May 2004


I have made a little modification.

  1. put all the sytles together or nearby
  2. Add a tag <div qcal> for better style manipulation
  3. Generate a link for each Month, each Year and each Quater. wink
  4. Using the TWiki type URLs rather than a html tag (a href ...) to generate links. This is great to differ exist pages from those do not. However, I also left the html tag. You can un-remark it as your wishes.

Known problems:

  1. The following system-wide varibles (NEWTOPICBGCOLOR & NEWTOPICFONTCOLOR, especially the first one) will over-write the color setting of calendar, which makes setting the colors more difficult, even I change the the NEWTOPICBGCOLOR to white. Set NEWTOPICBGCOLOR 'transparent' is better. ;p
    • Set NEWTOPICBGCOLOR = transparent
    • Set NEWTOPICFONTCOLOR
  2. The auto-linking generate a '?' after days that doesn't exist, The '?' is a little large. It's better to change it to '.' or something smaller as the calendar in my friend's oddmuse.
  • Can anybody tell me or comment on this?

I name the patch QuickCalendarPlugin-han.diff. You can modify or use it as your wishes.

-- ThYang - 16 May 2004

Is it possible to change the first day of the week from Sunday to Monday?

-- SlavenRezic - 26 Jul 2004

checked .zip into CVS

-- WillNorris - 19 Jul 2005

Need to change &TWiki::extractNameValuePair to &TWiki::Func::extractNameValuePair (4 lines starting at line 389)

-- CrisRhea - 09 May 2006

published a new version

-- WillNorris - 09 May 2006

Plugin topic does not seem to be updated. Change history at least is not up to date

-- KennethLavrsen - 10 May 2006

 
Topic attachments
I Attachment Action Size Date Who Comment
elsediff QuickCalendarPlugin-han.diff manage 6.0 K 2004-05-16 - 03:55 ThYang  
elsediff QuickCalendarPlugin.diff manage 2.9 K 2003-09-25 - 06:07 WillNorris  
Topic revision: r30 - 2006-05-10 - 02:01:01 - KennethLavrsen
 
TWIKI.NET
This site is powered by the TWiki collaboration platform
Ideas, requests, problems regarding TWiki? Send feedback
Copyright © 1999-2009 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.