ical/ics: Better way to do a daily 3-month reminder every year - icalendar

I am trying to setup a daily 3-month reminder that would occur every year; that is a reminder that occurs daily starting August 1st and ending October 31st, every year. I poured over the RFC and crafted a RRULE that I am sure will work, but I am curious: is there a better way?
RRULE:FREQ=YEARLY;BYMONTH=8,9,10;BYMONTHDAY=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
This ICS is going to be imported into Google calendar.

Yes there is a simpler solution. Just create a rule to recur DAILY but only in months 8, 9 and 10:
FREQ=DAILY;BYMONTH=8,9,10
Your start date should be August 1st.
See the results as generated by recurrence-expansion-service.appspot.com.

Related

Identify and name a timestamp for specific data entry points

I have a situation where I'm trying to look at changes in data based on timestamp of user entry (or 'created on').
The data highlights planning for delivery of goods, users have the ability to 're-plan' their dates of entry.
What I need to do is look at the timestamp for each 're-planning' date and be able to tell if the date of planning was changed within 7 days of delivery. For example
Data line XXY was planned for delivery on the 29th of August, 2017...but was changed, ON the 27th, to the 30th....this is a flag...
Like wise XXZ was planned for the 30th but changed to September 15th on the 29th...also a flag. Both were changed within 7 days of their previous 'delivery' date. Does this make sense and is there a simple way to do this?

How to calculate recurring/repeating monthly events (e.g. first Friday)?

How to calculate dates for things like 1st Friday or 3rd Saturday?
I took Dave Peterson's answer from 2005(!) and adapted it a bit so you can drag down in google sheets.
Example for 3rd saturdays:
In A1, put "DATE(YEAR(TODAY()),MONTH(TODAY()),1+7*3)
-WEEKDAY(DATE(YEAR(TODAY()),MONTH(TODAY()),8-7))"
In A2, put "DATE(YEAR(A1),MONTH(A1)+1,1+7*3)
-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,8-7))"
That will calculate the year based off your current date. The part that is controlling the week number (ie 3rd or 1st) is that 7*3(3rd week) part. That part that is controlling the day of the week is the 8-7 part. Still trying to grok that. The +1 is adding a month, thus allowing you to do a fill down.
Test this against google calendar to get it right. Hope this can help someone stuck!
Make a copy of it if you'dlike: https://docs.google.com/spreadsheets/d/1lOroSjy9EXLoiu-kDE3w1EMWw42HMIG7YJ3iGNhpl34/edit?usp=sharing
For the first five mondays from March 2018,
=ARRAYFORMULA(WORKDAY.INTL(DATE(2018,3,),ROW(A1:A5),"0111111"))
Uses string method of WORKDAY.INTL to declare specific weekday as the only working day.
For third Saturday of each month from March 2018,
=ARRAYFORMULA(WORKDAY.INTL(DATE(2018,ROW(A3:A12),),3,"1111101"))

What Date Time Format is this?

What date time format is this : 735715:37344280
<ExecDateTOD Friendly="Monday April 27, 2015 10:23:00am">735715:37344280</ExecDateTOD>
It's found in C:\Windows\Performance\WinSAT\DataStore\file_name.xml, and is the date time when the Windows Experience Index Assessment test was run.
Any idea how it's structured and can be edited? I need to change it to a previous years Date.
It seems that this format is called VariantTime, in MSDN the call to convert time is called VariantTimeToSystemTime. So it may be number of days, with decimal part after the :.
For the timestamp 735715:37344280
The first number (the one before the colon) is the number of days since the year 0:
735715 / 365 = 2015.66
The second number (the one after the colon) is the number of milliseconds that have passed within the current day.
37344280 / (1000*60*60) = 10.37 hours since start of day
So you can just subtract 365 days from the first number to obtain the previous year like this:
<ExecDateTOD Friendly="Monday April 27, 2014 10:23:00am">735350:37344280</ExecDateTOD>
Note that there were no leap years in either 2015 or 2014, so these year are exactly 365 days long.
Here is a link to a page with another <ExecDateTOD> tag where you can compare: http://www.scribd.com/doc/82935159/2012-01-30-16-00-49-986-Formal-assessment-Recent-WinSAT#scribd
I think that if you subtract 365 from that number, you'll be in previous year.
That number seems to be days since the year 0. The first part might be the number of days, taking into account leap years, etc). The second part the time coded in some way.

PayMill subscription interval regularity

Simple questions, but I can't seem to find the answers in PayMill's API documentation or FAQ:
If a payment subscription is classed as monthly, does it poll for the funds every 30 days or on the anniversary of the month, i.e. set up on 15.4.2014, next payment 15.5.2014?
If it polls on the same date every month, what happens if the subscription was set up on the 31st of the month, i.e. on a date not present in February, April etc?
Thanks.
On the same date. If the interval is 1 MONTH and the first payment occurs on 15.4.2014 the next one will be on 15.5.2014. Note that you can also specify a weekday, in that case it will be the next weekday (e.g. Monday), either the 15.05.2014 (if it's a Monday) or the first Monday after 15.05.2014
It will probably be on the next day (1 March instead of the "missing 31 February". It will definitely not be skipped. If the exact behavior is crucial for your business, please contact the PAYMILL support to seek a definite answer.

Auto-renewable subscriptions: How long a month is?

I got confused about some issues:
1: The one month duration of auto-renewable subscriptions is 30 days or does it depend on a natural month?
Because I can only test in sandbox mode,so the duration is just several minutes...
Maybe Apple just simply calculates it like this: 2013\01\15 -> 2013\02\15 -> 2013\03\15. If so,the second issue comes up
2: For example: I buy a monthly auto-renewable subscriptions at 2013\03\31 ,because 2013\04 only has 30 days, then what is the expires_date of my subscriptions? 2013\04\30 or 2013\05\01 or other date ?
It's adding 1 month, not 30 days. The number of days in 1 month varies. So purchasing a subscription on 3/31 would end on 4/30.
You can use NSDate, NSCalendar, and NSDateComponents to add a month to a date and see how long it will last. More info here: Modifying NSDate to represent 1 month from today
I can confirm this from my own app's data on both iOS and Android.
If someone purchases a monthly renewing subscription on, for example, the 15th of one month, then it will renew on the 15th of the next month, irrespective of how many days were in the month.
If someone purchases the subscription on the 31st of March, then it will renew on May 1st (because April has no 31st day, the renewal date will jump to the next available day in the calendar year - this also applies to February in a leap year, etc).
Given this, and assuming your app's primary income is from subscriptions, over time you should expect to see lower than average sales on the 31st of any given month because there won't be as many renewals. But it is no cause for concern as it is counteracted by the fact that you should expect to see higher than average sales on the 1st of any month that follows a long month anyway. Don't be dissapointed if you check your stats on the 31st of any month.