Fix #317.
When the calendar app is installed for the first time a dummy event with the exact date 1901-01-01 is created. When a new calendar is created, each time, a dummy event with the date 1901-01-01 RELATED TO THE LOCAL TIMEZONE is created (so 1901-01-01 more or less 12h).
There is no way to tell the difference between the dummy event and another event from the DB, so this fix doesn't export any events for end dates before the year 1901 included.
I choose to detect only the year instead of be more accurate (we could prevent only events of 1901-01-01 and 1900-12-31) to not slow down the performance when exporting a lot of events, while using momentJS to keep date formats compatibility.
Fix #317. When the calendar app is installed for the first time a dummy event with the exact date 1901-01-01 is created. When a new calendar is created, each time, a dummy event with the date 1901-01-01 RELATED TO THE LOCAL TIMEZONE is created (so 1901-01-01 more or less 12h). There is no way to tell the difference between the dummy event and another event from the DB, so this fix doesn't export any events for end dates before the year 1901 included.
I choose to detect only the year instead of be more accurate (we could prevent only events of 1901-01-01 and 1900-12-31) to not slow down the performance when exporting a lot of events, while using momentJS to keep date formats compatibility.