|
|
| Author |
Message |
| Gazdaman |
This post is not being displayed .
|
 Gazdaman I did a trackday!!!

Joined: 12 Aug 2004 Karma :    
|
 Posted: 23:08 - 15 Nov 2009 Post subject: Anyone done any iCalendar work? |
 |
|
I know this may out-geek what is essentially a motorbike forum! But I thought I'd try anyway.
I'm trying to write a .ics file to enter entries into a calendar every 10 days.
That's not too bad, it looks like this:
| Code: |
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
METHOD:PUBLISH
VERSION:1.0
PRODID:-//GazScript//ShiftCal//EN
X-WR-CALNAME;VALUE=TEXT:ShiftCal
BEGIN:VEVENT
SUMMARY:First Early Shift
DTSTAMP:20091115T220000
UID:D70C88D5-E5A1-48EC-84A4-D05DBD5CD8F6-1
DTSTART:20091117T070000
DTEND:20091117T160000
RRULE:FREQ=DAILY;INTERVAL=10
BEGIN:VALARM
TRIGGER:-PT1H15M
REPEAT:1
DURATION:PT5M
ACTION:AUDIO
END:VALARM
END:VEVENT
END:VCALENDAR
|
The bit I can't work out, is how can I change the entry if it falls on a Thursday, Friday or Saturday. At the moment it just places an entry every 10 days regardless.
There is a BYDAY argument that allows you to specify a day, but I don't think it works if you've specified a 'DAILY' repeat rule.
Clutching at straws I know, but anyone done any?
Gaz |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Neorion |
This post is not being displayed .
|
 Neorion World Chat Champion

Joined: 08 Jul 2008 Karma :     
|
 Posted: 09:29 - 16 Nov 2009 Post subject: |
 |
|
I dont do a lot of scripting but could you not use a conditional variable if thats supported in the code your using?
If var= thursday; friday; saturday'
Then
run whatyouwanttodo.script
 ____________________ VFR FI 2000- Shiney Red Thing
"some things man was never meant to know, for everything else there's Google" |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Gazdaman |
This post is not being displayed .
|
 Gazdaman I did a trackday!!!

Joined: 12 Aug 2004 Karma :    
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| dibbster |
This post is not being displayed .
|
 dibbster Nearly there...

Joined: 15 Apr 2004 Karma :  
|
 Posted: 14:52 - 16 Nov 2009 Post subject: |
 |
|
If it is every 10 days they will always fall in the same order e.g. If your 1st day is today (monday)
10 days would be Thu, then Sun Wed Sat Tue Fri and back to monday. Can you exploit that in some way?
What if you did it every 70 days and had 7 VEVENTS? (4 of one type and 3 different ones for Thur, Fri and Sat.)
Just a thought  ____________________ Suzuki RF 600 - The two wheeled Testarossa (Deceased)
Suzuki GSXR - Now stops on a sixpence; SBK3's
www.bikepics.com/members/dibbster |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Gazdaman |
This post is not being displayed .
|
 Gazdaman I did a trackday!!!

Joined: 12 Aug 2004 Karma :    
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
Old Thread Alert!
The last post was made 16 years, 345 days ago. Instead of replying here, would creating a new thread be more useful? |
 |
|
|