icalendar

Given a weekday and the day of the month it occurs, can I get its ordinal position in constant time?

有些话、适合烂在心里 提交于 2020-01-15 12:11:07
问题 Say I'm given a date, from which I can get its day of the month and day of the week. For example (in Javascript): var d = new Date(1316038581772); // Wed Sep 14 2011 12:16:21 GMT-1000 var dayOfWeek = d.getDay(); // 3 - Wednesday var dayOfMonth = d.getDate(); // 14 - Day of month I'm looking for a value n such that this date is the n th day of the week in the month. In this case, I'm looking for n=2 , for the 2nd Wednesday in September 2011. The naive algorithm would be to find the first

Given a weekday and the day of the month it occurs, can I get its ordinal position in constant time?

微笑、不失礼 提交于 2020-01-15 12:09:33
问题 Say I'm given a date, from which I can get its day of the month and day of the week. For example (in Javascript): var d = new Date(1316038581772); // Wed Sep 14 2011 12:16:21 GMT-1000 var dayOfWeek = d.getDay(); // 3 - Wednesday var dayOfMonth = d.getDate(); // 14 - Day of month I'm looking for a value n such that this date is the n th day of the week in the month. In this case, I'm looking for n=2 , for the 2nd Wednesday in September 2011. The naive algorithm would be to find the first

How to create .ics file programmatically?

浪子不回头ぞ 提交于 2020-01-12 09:51:50
问题 How can I create an icalendar file with minimum data, I try to make it as the following but somethings wrong, when I try to import to my Google calendar, it says Events successfully imported but I cant see those event on my calendar strResult.Append("BEGIN:VCALENDAR" & vbCrLf) strResult.Append("VERSION:2.0" & vbCrLf) strResult.Append("METHOD:PUBLISH" & vbCrLf) While rst1.Read strResult.Append("BEGIN:VEVENT" & vbCrLf) strResult.Append("DTSTART: " & CDate(getLeave_date_start(CStr(rst1

Start date returns in some cases when using google-rfc-2445 (iCalendar)

家住魔仙堡 提交于 2020-01-12 07:31:07
问题 I ran through a lot of RRULEs just for testing out the performance of google-rfc-2445 (a Java implementation of IETF RFC 2445 iCalendar). I saw that I got the start date back in some cases in the returning list from the method. The test is very simple: private static void runGoogleTests() throws ParseException { DateTimeZone dtz = DateTimeZone.UTC; DateTime dtStart = new DateTime("2014-11-22T00:00:00Z", dtz);//SATURDAY DateTimeIterable dti = DateTimeIteratorFactory.createDateTimeIterable(

Change event description for organizer using VCalendar

帅比萌擦擦* 提交于 2020-01-11 13:23:29
问题 currently we are using outlook to create a meeting and send it to email x . Whenever imap mailbox x gets an email it automatically parses and send updated iCal file (with new description) to all participants that was added and organizer. Everything is ok for all participants, except organizer, description in outlook calendar is not updating for organizer (old description is left). I am adding Sequence + 1 , changing timestamp, but still the same problem. Does that mean that for organizer

Allowing ics to open in phonegap app for iOS

陌路散爱 提交于 2020-01-11 03:18:06
问题 So I've used this code from here slightly augmented to work on iOS to create an ics file on the fly. msgData1 = $('.start-time').text(); msgData2 = $('.end-time').text(); msgData3 = $('.Location').text(); var icsMSG = "BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//Our Company//NONSGML v1.0//EN\nBEGIN:VEVENT\nUID:me@google.com\nDTSTAMP:20120315T170000Z\nATTENDEE;CN=My Self ;RSVP=TRUE:MAILTO:me@gmail.com\nORGANIZER;CN=Me:MAILTO::me@gmail.com\nDTSTART:" + msgData1 +"\nDTEND:" + msgData2 +"\nLOCATION:"

How to extract a string using JavaScript Regex?

时光怂恿深爱的人放手 提交于 2020-01-09 07:09:14
问题 I'm trying to extract a substring from a file with JavaScript Regex. Here is a slice from the file : DATE:20091201T220000 SUMMARY:Dad's birthday the field I want to extract is "Summary". Here is the approach: extractSummary : function(iCalContent) { /* input : iCal file content return : Event summary */ var arr = iCalContent.match(/^SUMMARY\:(.)*$/g); return(arr); } 回答1: You need to use the m flag: multiline; treat beginning and end characters (^ and $) as working over multiple lines (i.e.,

How to extract a string using JavaScript Regex?

核能气质少年 提交于 2020-01-09 07:08:59
问题 I'm trying to extract a substring from a file with JavaScript Regex. Here is a slice from the file : DATE:20091201T220000 SUMMARY:Dad's birthday the field I want to extract is "Summary". Here is the approach: extractSummary : function(iCalContent) { /* input : iCal file content return : Event summary */ var arr = iCalContent.match(/^SUMMARY\:(.)*$/g); return(arr); } 回答1: You need to use the m flag: multiline; treat beginning and end characters (^ and $) as working over multiple lines (i.e.,

How to extract a string using JavaScript Regex?

亡梦爱人 提交于 2020-01-09 07:08:43
问题 I'm trying to extract a substring from a file with JavaScript Regex. Here is a slice from the file : DATE:20091201T220000 SUMMARY:Dad's birthday the field I want to extract is "Summary". Here is the approach: extractSummary : function(iCalContent) { /* input : iCal file content return : Event summary */ var arr = iCalContent.match(/^SUMMARY\:(.)*$/g); return(arr); } 回答1: You need to use the m flag: multiline; treat beginning and end characters (^ and $) as working over multiple lines (i.e.,

How can I exclude DTSTART from generated events if its day not among days specified by BYDAY?

吃可爱长大的小学妹 提交于 2020-01-07 03:00:31
问题 I'm using google-rfc-2445 to generate repeating events according to according to rfc-2445: The "DTSTART" property for a "VEVENT" specifies the inclusive start of the event. For recurring events, it also specifies the very first instance in the recurrence set. So, for example RRULE for event which occures every Friday 5 times: DTSTART;TZID=US-Eastern:20160204T090000 RRULE:FREQ=WEEKLY;COUNT=5;BYDAY=FR;INTERVAL=1; So according to rfc-2445 it will generate 6 events. First event on Thursday 4