Page MenuHomePhabricator

Schedule monthly events on the 29th, 30th or 31st relative to the end of the month
ClosedPublic

Authored by epriestley on Oct 31 2016, 6:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 2:25 AM
Unknown Object (File)
Wed, Dec 11, 7:43 AM
Unknown Object (File)
Sun, Dec 8, 9:39 PM
Unknown Object (File)
Wed, Nov 27, 6:01 PM
Unknown Object (File)
Nov 23 2024, 11:56 PM
Unknown Object (File)
Oct 22 2024, 3:29 AM
Unknown Object (File)
Oct 14 2024, 4:45 AM
Unknown Object (File)
Oct 9 2024, 3:24 AM
Subscribers
None

Details

Summary

Ref T11326. If you scheudle a monthly event on the 31st, the default behavior of RRULE means that it only occurs in months with 31 days.

This is actually how Google Calendar and Calendar.app both work: if you schedule a monthly event on the 31st, you get about six events per year.

This seems real confusing and bad to me?

Instead, if the user schedules a monthly event on the 29th, 30th or 31st, pretend they scheduled it on the "last day of the month" or "second-to-last day of the month" or similar, so they always get 12 events per year.

This could be slightly confusing too, but seems way less weird than not getting an event every month.

Test Plan

Scheduled events on the 31st of October, saw them occur in November too after the patch.

Diff Detail

Repository
rP Phabricator
Branch
calendar2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 14293
Build 18595: Run Core Tests
Build 18594: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Schedule monthly events on the 29th, 30th or 31st relative to the end of the month.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Oct 31 2016, 7:09 PM

(It's possible that this magic is worse than the default, but it seemed way weirder to me to end up with 6 or 11 events per year for a "monthly" event than to have them schedule on different days -- I primarily expect a monthly event to occur 12 times per year, and have fewer expectations about exactly which day it occurs on.)

My highly scientific Facebook poll seems to be corroborating this as a generally reasonable/expected behavior among a random, unbiased sample of Calendar users.

This revision was automatically updated to reflect the committed changes.