I need to take backup of calendar on my phone. We have requirement that we need to take backup of entire calendar data. Now, phone always supports recurring events. So, event may exist from 01-01-1601 to 31-12-3000. Logically, there is no point of taking backup from 01-01-1601 to 31-12-3000.

I just want to know your views on the ideal range for the same.


The ideal range is what the person/organisation that gave the requirement says anything else might be wrong.

If the requirement seems wrong/too complex then discuss it with the originator.


How do you think the phone stores the recurring appointments? Try to do the same. Mostly sure the recurring events are stored using three values: <start date, recurrence period, end date (optional)>.

For non-recurring events, just make a normal copy.

And to be really on-topic: store ALL the future events/appointments and, eventually, ask the user if anything from the past should be saved because some don't want at all, some want at most x months/weeks ago, some want everything.

  • +1 for storing EVERYTHING. Backup is backup, you shouldn't loose anything. Additionally making a user-controlled cleanup is a good idea. – maaartinus Sep 9 '11 at 11:17

Can't you record the recurring event once and the period of recursion? For non-recurring events, you can record them all.


Ideal range == the maximum existing range. The backup will likely contain only existing events, so e.g. if you only have a single event in your calendar at 2011-09-09, it doesn't matter where the possible range begins and ends. As for recurring events - do you have your schedule booked all the way up to year 3000? That seems a bit...too optimistic, IMHO.

Logically, there's no point in having a "complete" backup which is not a complete backup, but only pretends to be.

BTW, it's such "cleverness" and cutting corners with dates ("naah, we'll never need that") which has brought us the famous Y2K.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.