BUGS
====

 - if a recurring event has an occurrence that ends on the SAME DAY as
   another of its occurrences starts, it will only be rendered ONCE (for 
   the 2nd occurrence)



TODO
====

 - get_event() now returns FALSE instead of displaying an error
   when evt not found; so I need to go back to all the code that
   uses get_event() and throw the error there if necessary!

 - there is also javascript in the switch calendar dropdown below
   all the calendar views

 - when uploading/synching, provide feedback about calendar not
   being in expected format?  ie., if junk, well, fine, but if
   vCal, we need to tell the user we don't understand vCal (yet);
   so maybe look for a minimal set of properties and at least one
   event (or what?  how else?)

 - save event cache to backend so next time it loads it is fast?
   currently, the cache of start/end dates organized by date seems
   to have given us the speed we need, so I am holding off on this
   for now

 - make click of event from month or year view go directly to the
   event page NOT to the day view (? maybe this can be a user pref?)

 - linked calendar exports are not including events, so that should
   be fixed.  is this going to be hard?  also, please carefully look
   at whether or not all-day events' DTEND is reflected correctly
   based on the Microsoft-compatible checkbox!

 - allow display of more than one cal at one time (overlays)

 - allow import of cal from URL (not just local file)

 - base event merge decision on sequence number instead of last modified date??

 - do some kind of validation (at least for a BEGIN:VCAL line??) on imported/uploaded/linked
   calendars?  otherwise, it's just junk and you basically get a blank calendar

 - I18N
   where else do we need to use sprintf for correct I18N?

 - add more fields to event edit screen: status, percent complete, what else?
   how about recurrence option (another radio selection): "never ends" (no end count/date)
   how about all-day events!!!!

 - day view: when three columns, wide (and more?), the thrid column
   doesn't get colspanned correctly below it... we see dark background that shouldn't be there

 - ummm, in file_backend, do we need the holiday_functions.php file any more??

 - remove usage of getdate() where just using date() is more direct

 - what about how "today" is presented to someone using the system in germany or japan....????
   should be OK, verify by changing SM timezone settings

 - cleanup of any javascript  -- make sure it can be optional!

 - block out cal admin page if javascript not on

 - add javascript that sets the end date (and time?) to the same as the start date
   when user selects a start date (onChange) (make sure it works when
   selecting date using the month_helper popup too)

 - smallcal's year view is a "real" year view!  can we use it??

 - Make hours clickable on day view (to add event) in addition or in leiu of
   add icons??

 - if we use smallcal's year view, we might still want to keep a link somewhere to "all months" 

 - name/description fields when exporting/importing should get all the encoding/lanuage/charset information property parameters completely filled out using the current SM settings

 - I think this is OK, but make sure when we create events that they get stored with correct timezone info so they show up correctly when opened in another timezone

 - phpDoc @access 

 - add an easy way to allow *anyone* write access to a public calendar  
   (er, make sure public cals are only *readable* by anyone but writable
   by owners only, right?).  maybe some kind of checkbox or a note that 
   a single asterisk wildcard for the username will suffice (will it??)

 - end times in iCal specs are NON-inclusive (start times are inclusive)
   make sure our display code reflects this correctly

 - when VTIMEZONE (whatever) is included, i think that might mean that we need to convert all dates/times given in local format using the timezone specified there.  need to look at this closer

 - deleting calendars --- need some kind of confirmation!
   otherwise it's WAY TOO EASY to just wipe out all events 
   and the whole cal with one click!! YIKES!!

 - externally linked calendars will always have a created date that comes 
   after the updated date (unless mtime is not given by remote HTTP headers);
   if we do any validaing on the calendar object, this could be seen as
   an error -- must make sure to make this exception for external calendars

 - month view maybe should show the user that there are more events on a day 
   than shown (when the number of events exceeds allowable number of events
   that can be shown for that day on the month view per the config file)

 - todo/task list event type (and special link on interface and its own display/edit page)

 - backend fxn : get all tasks/todos (copy get all recurring fxn)

 - external calendar name goes in unsanitized i think.  is this a problem??
   also, external cal URIs are supposedly sanitized thru the url validator,
   but that is not my code and i don't completely trust it....

 - allow exporting of single events

 - add a way to *exclude* users from calendar/event access (for example, we
   want to give access to *@openguild.net to our OG calendar but NOT to the
   test@openguild user!

 - rewrite the top of the admin options page...
      o the "Users" side is also holiday management and general calendar management
      o the "Calendars" side is ONLY for creating and deleteing calendars
      o we might be able to use hyperlinks instead of silly buttons

 - force recurring event caching for any other recurring items?  (such as TODO/TASKS)??
   If so, look, at how it was done for regular recurring events as well as holidays.

 - I'm not so sure the url_validator is very well written (didn't even define constants!!)
   and it looks possibly inefficient and like overkill.... but it's enough for now
   Find another one only if time allows

 - It is possible that I misinterpreted the RFC in that all-day events will have
   DTEND as the next day, since DTEND is non-inclusive (i thought that's only
   for non all-day events)
        BEGIN:VEVENT
        DTSTART;VALUE=DATE:20050306
        DTEND;VALUE=DATE:20050307
        SUMMARY:F1: Melbourne\, Australia
        UID:C0FBFC80-8032-11D9-A6B4-000A95AA0EA4-RID
        DTSTAMP:20050216T160033Z
        END:VEVENT

 - do Todo/Task type of events *require* a due date?  currently getDueDateTime()
   in the event class assumes so.  We may need to change that if this is not the 
   case (see RFC)



RESOURCES
=========

 - Olson tz main site
   http://www.twinsun.com/tz/tz-link.htm
 - Useful tool to make ical(VTIMEZONE) files out of olson tz database
   http://dialspace.dial.pipex.com/prod/dialspace/town/pipexdsl/s/asbm26/vzic/
   We might use this to generate a static set of VTIMEZONEs for inclusion
   in exported iCal files.  The files would have to be statically included
   with the plugin, but we could include this tool if sysadmins want to regenerate
   them on their own
 - Not much here that isn't already covered in this plugin, but anyway:
   http://www.phpbuilder.com/columns/chow20021007.php3?print_mode=1
   http://www.shuchow.com/vCalAddendum.html
 - External calendars:
   http://ical.mac.com/s.armbrust/F1322005.ics



FUTURE ENHANCEMENTS
===================

 - ability to publish full ical file upon every save (this can be an option 
   in the file backend but other backend users will want this too)

 - create an automated publishing process?  a given calendar would be pushed out as an iCal file once every so often to a public place....  cmd-line php by cron?

 - Add more recurrence controls to create/edit event screen to take advantage
   of the full power of the plugin's recurrence engine

 - More interfaces needed:    - holiday (note personal cal holiday edit interface must
                                be linked off of regular calendar view)
                              - show time of event in month view if possible, which 
                                may be too much (if not, make sure it's in the mouseover)
                              - need WEEK VIEW!
                              - need TODO/TASK screen

 - flexible holiday lists
     - per-calendar -- calendar has its own holidays
     - holidays are separate event objects, also stored in a global location 
       so other calendars can use them too
     - need interface to allow holidays to be added/removed to/from calendar

 - export iCal (.ics)
 - export vCal (.vcs)
 - import iCal
 - import vCal

 - synch incoming imported calendars/events

 - notification of conflicting events (when?  upon creation?)

 - alarms/reminders
   reminders can be sent in flexible/configurable formats:
     email
     SMS
     other
     also have popup upon login
     reminder time set by user choice
 - event attributes: reminder method (??)

 - finish TODO/TASK functionality

 - meeting request system

 - event attributes: invited, accepted, maybe, declined

 - vCal-style recurrence rules for vCal export

 - hourly recurrence? minutely? secondly? (see related bug above)

 - some day maybe we want to support more than one holiday falling on the same day...

 - RSS feed of calendar data (PHP iCalendar has code we can steal)

 - 4.2.12 PARTSTAT for Cal-Address items for knowing who answered to an event

 - role 4.2.16

 - alarm trigger (trigger off end or start of an event) 4.2.14

 - RRULE values really make a lot more sense as parameters, so I
   would not be surprised if some applications format their RRULEs
   with all data as parameters with NO VALUE at all.  Do we want
   to accomodate that?

 - Another possible speed enhancement for the recurrence engine is to only jump by intervals (don't inspect other rules such as BYDAY, BYMONTH, etc.) until the current interval/iteration is in the actual current target month/day/year (depending on what view we are looking at (or we could just always default to year, since that should be sufficiently fast)) (uh, NO, this is not workable, since we need to keep count of the total occurrences, which can't be done w/out full RRULE evaluation.  well, that's OK, since the caching of occurrences has sped things up a magnitude of 30 times or more

   Anther one??  possibly skip any events if they have BYMONTH and the current month being viewed is not in that clause??  dunno how realistic or efficient this will be, but OTOH, it could be a winner (also BYDAY, etc)



NOTES
=====

 - Note that events have ability to be owned, read, written by differnent users, 
   just like calendar permissions, but they currently are all created with the 
   same owners/read/write users as the parent calendar



OTHER SIMILAR PROJECTS
======================
http://www.k5n.us/webcalendar.php
http://phpicalendar.net (only displays calendars)
http://www.webcalng.com/
http://bulldog.tzo.org/webcal/webcal.html (older version of the above)
http://awsd.com/scripts/webcal/ (payware that looks like it's nothing good)



MORE RRULEs TO TEST
===================
SUMMARY:Armed Forces Day
DESCRIPTION:3rd Saturday of May
DTSTART;VALUE=DATE:17530519
RRULE:FREQ=MONTHLY;BYMONTH=5;BYDAY=3SA

SUMMARY:Columbus Day
DESCRIPTION:2nd Monday of October
DTSTART;VALUE=DATE:17531008
RRULE:FREQ=MONTHLY;BYMONTH=10;BYDAY=2MO

SUMMARY:Daylight Savings +1 hr
DESCRIPTION:1st Sunday of April
DTSTART;VALUE=DATE:17530401
RRULE:FREQ=MONTHLY;BYMONTH=4;BYDAY=1SU

SUMMARY:Father's Day
DESCRIPTION:3rd Sunday of June
DTSTART;VALUE=DATE:17530617
RRULE:FREQ=MONTHLY;BYMONTH=6;BYDAY=3SU

// notice this non-standard one!
// X-WD-RECUR-EASTER and X-WD-RECUR-OFFSET 
// need to be coded before we support this
BEGIN:VEVENT
SUMMARY:Mardi Gras (Fat Tuesday)
DESCRIPTION:47 days before Easter
DTSTAMP:20030701T000000Z
UID:holiday0023@icaldates.com
CATEGORIES:Holiday - US
DTSTART;VALUE=DATE:17530308
X-WD-RECUR-EASTER:TRUE
X-WD-RECUR-OFFSET:-47
END:VEVENT

SUMMARY:Martin Luther King Jr.
DESCRIPTION:3rd Monday of January
DTSTART;VALUE=DATE:17530115
RRULE:FREQ=MONTHLY;BYMONTH=1;BYDAY=3MO

SUMMARY:Memorial Day
DESCRIPTION:Last Monday of May
DTSTART;VALUE=DATE:17530528
RRULE:FREQ=MONTHLY;BYMONTH=5;BYDAY=-1MO

SUMMARY:Mother's Day
DESCRIPTION:2nd Sunday of May
DTSTART;VALUE=DATE:17530513
RRULE:FREQ=MONTHLY;BYMONTH=5;BYDAY=2SU

SUMMARY:President's Day
DESCRIPTION:3rd Monday of February
DTSTART;VALUE=DATE:17530219
RRULE:FREQ=MONTHLY;BYMONTH=2;BYDAY=3MO

SUMMARY:Thanksgiving
DESCRIPTION:4th Thursday of November
DTSTART;VALUE=DATE:17531122
RRULE:FREQ=MONTHLY;BYMONTH=11;BYDAY=4TH

