Saints iCal Dev
From Fxp Wiki
Contents |
iCalendar Tutorial
You can edit any .ics file You can build them from any table:
- timestamps are build in three parts: first the date in number, then the letter "T" (for time), then the hours in numbers:
- yearMonthDayThoursMinutesSeconds
- 20060406T220851
- For Sunbird, you need a "Z" at the end, not for Rainlendar
- UID: to be sure each event is different, you need a (Globally Unique Identifier) which means a unique Id, usually build by using the date,the time and the number of your computer
The structure of a calendar
BEGIN:VCALENDAR
BEGIN:VEVENT
...values for event 1 ...
END:VEVENT
BEGIN:VEVENT
...values for event 2 ...
END:VEVENT
BEGIN:VEVENT
...values for event 3 ...
END:VEVENT
END:VCALENDAR
For Sunbird
- For allday events, you don't mention an hour, so you need to tell the engine that it is normal by adding a "value=date" parameter to the Start Date (DTSTART),
- BEGIN:VEVENT
- CREATED:20060406T220847Z
- LAST-MODIFIED:20060406T220851Z
- DTSTAMP:20060406T220851Z
- UID:uuid:7F9525B2-522C-4FEE-8E9D-245AA57BCF3F
- SUMMARY:Jour de l'an
- CLASS:PUBLIC
- RRULE:FREQ=YEARLY;INTERVAL=1
- DTSTART;VALUE=DATE:20060101
- DTEND;VALUE=DATE:20060101
- CATEGORIES:Saints
- X-LIC-ERROR:No value for STATUS property. Removing entire property:
- END:VEVENT
- For Sunbird you need to add this at the beginning
- BEGIN:VCALENDAR
- VERSION:2.0
- PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.0//EN
- Don't forget the END:VCALENDAR at the end of the file
GUIDgen Macro for EXCEL
- found at: http://www.mrexcel.com/tip078.shtml
- Used on Excel97 and 2002
'------------------------------------------ ' basGuid from http://www.trigeminal.com/code/guids.bas ' You may use this code in your applications, just make ' sure you keep the (c) notice and don't publish it anywhere ' as your own ' Copyright (c) 1999 Trigeminal Software, Inc. All Rights Reserved '------------------------------------------ Option Compare Binary ' Note that although Variants now have ' a VT_GUID type, this type is unsupported in VBA, ' so we must define our own here that will have the same ' binary layout as all GUIDs are expected by COM to ' have. Public Type GUID Data1 As Long Data2 As Integer Data3 As Integer Data4(7) As Byte End Type Public Declare Function StringFromGUID2 Lib "ole32.dll" (rclsid As GUID, ByVal lpsz As Long, ByVal cbMax As Long) As Long Public Declare Function CoCreateGuid Lib "ole32.dll" (rclsid As GUID) As Long '------------------------------------------------------------ ' StGuidGen ' ' Generates a new GUID, returning it in canonical ' (string) format '------------------------------------------------------------ Public Function StGuidGen() As String Dim rclsid As GUID If CoCreateGuid(rclsid) = 0 Then StGuidGen = StGuidFromGuid(rclsid) End If End Function '------------------------------------------------------------ ' StGuidFromGuid ' ' Converts a binary GUID to a canonical (string) GUID. '------------------------------------------------------------ Public Function StGuidFromGuid(rclsid As GUID) As String Dim rc As Long Dim stGuid As String ' 39 chars for the GUID plus room for the Null char stGuid = String$(40, vbNullChar) rc = StringFromGUID2(rclsid, StrPtr(stGuid), Len(stGuid) - 1) StGuidFromGuid = Left$(stGuid, rc - 1) End Function
Categories: Computer | Tutorial | Office
