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)
Wed, Mar 27, 5:12 PM
Unknown Object (File)
Wed, Mar 27, 12:34 PM
Unknown Object (File)
Wed, Mar 27, 12:34 PM
Unknown Object (File)
Fri, Mar 22, 7:45 PM
Unknown Object (File)
Wed, Mar 20, 12:20 AM
Unknown Object (File)
Thu, Mar 7, 1:11 PM
Unknown Object (File)
Feb 12 2024, 6:26 PM
Unknown Object (File)
Feb 12 2024, 3:26 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.