Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 669262 - Lightning cannot do semi-monthly entries
: Lightning cannot do semi-monthly entries
Product: Calendar
Classification: Client Software
Component: Dialogs (show other bugs)
: Lightning 2.3
: All Other
: -- enhancement (vote)
: 2.3
Assigned To: Decathlon
Depends on:
  Show dependency treegraph
Reported: 2011-07-04 23:54 PDT by Brent Garber
Modified: 2013-02-18 09:35 PST (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

proposal: "last day of the month" button in the daypicker (5.85 KB, image/png)
2011-09-23 05:57 PDT, Decathlon
philipp: feedback+
patch - v1 (15.06 KB, patch)
2013-02-02 02:25 PST, Decathlon
matthew.mecca: review+
Details | Diff | Splinter Review

Description Brent Garber 2011-07-04 23:54:44 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
Build ID: 20110615151330

Steps to reproduce:

Attempt to add a semi-montly entry.

While you can select a biweekly sechedule, you're unable to select a semi-monthly schedule.

Actual results:

Cannot do it

Expected results:

Can do it
Comment 1 Stefan Sitter 2011-07-05 01:10:42 PDT
By "semi-montly" you mean something like repeats custom > monthly, every two months?
Comment 2 Brent Garber 2011-07-05 08:18:47 PDT
Semimonthly as in twice a month[1]. 

Commonly used in most payroll systems, either the first of the month and the 15th, or the 15th and the last day of the month.

While currently I can specify a custom recurrence and select the 15th, if I select the 31st, on months without 31 days the second recurrence wont happen.

1 -
Comment 3 Brent Garber 2011-09-20 13:24:12 PDT
This could be resolved by allowing multiple re-occurrences per event.

I can do:
1) Every 1 Month >> 15th
2) Custom>> Repeat Monthly >> Every 1 Month >> Last >> Day of the month

But I can do both on the same event.
Comment 4 Stefan Sitter 2011-09-21 01:52:52 PDT
You can apply only one recurrence rule to each event. Allowing multiple recurrence rules could be an enhancement request. But I don't know if the iCalendar specification supports it. Currently you can easily workaround by creating two events with one recurrence rule on each.
Comment 5 Brent Garber 2011-09-21 08:11:58 PDT
I dont see why it shouldn't be able to, from RFC 5545[1].

      Monthly on the first and last day of the month for 10 occurrences:


       ==> (1997 9:00 AM EDT) September 30;October 1
           (1997 9:00 AM EST) October 31;November 1,30;December 1,31
           (1998 9:00 AM EST) January 1,31;February 1

Should be able to just say BYMONTHDAY=15,-1 to say the 15th day and the last day.
Comment 6 Decathlon 2011-09-23 05:57:06 PDT
Created attachment 562024 [details]
proposal: "last day of the month" button in the daypicker

This bug is something like "Allow Lightning's UI to set the last day of the month in a BYMONTHDAY rule".

Actually Lightning can handle events with BYMONTHDAY rule and any negative numbers, i.e. days relative to the last day of the month (-1 is the last day of the month). 
Events like those reported in comment #5 are correctly displayed in Lightning, but they can't be created or modified due to missing features in the user interface.

In the past I tried to create an UI that handled all the negative days present in the BYMONTHDAY rule, but it was decided that in general it could be matter for an extension due to a non common use of this kind of rules (and also because the interface wasn't so intuitive ;-) ).

Maybe we can do an exception only for the "last day of the month" with a simple change in the monthly daypicker like that proposed in the screenshot, i.e. by adding a "last day" button.
The image is a mockup and it's completely different from the work I did for the other interface, but (hopefully) it shouldn't be so complicated.

What's your opinion Philipp? The ui review request is only to let you add this to the end of your long tasks queue ;-)
Comment 7 Philipp Kewisch [:Fallen] 2011-12-26 06:19:57 PST
Comment on attachment 562024 [details]
proposal: "last day of the month" button in the daypicker

Looks good to me, I think we should give it a try.
Comment 8 Decathlon 2013-02-02 02:25:59 PST
Created attachment 709363 [details] [diff] [review]
patch - v1

The daypicker needs only minimal changes to handle the "last day of the month" and a fews others to handle the new string in the function recurrenceRule2String().
I've also changed the background image of the daypickers with the linear-gradient css property like had been done in others Lightning's UI elements. In this way the file daypicker-background.png becomes useless and the same for the image and the stack in the daypicker binding. I've verified that the anonid and class attributes are not used elsewhere.
Comment 9 Matthew Mecca [:mmecca] 2013-02-17 11:42:09 PST
Comment on attachment 709363 [details] [diff] [review]
patch - v1

Review of attachment 709363 [details] [diff] [review]:

Looks good. r=mmecca

::: calendar/base/modules/calRecurrenceUtils.jsm
@@ +200,5 @@
> +                            if (lastDay) {
> +                                day_string += getRString("monthlyLastDay") + ", ";
> +                            }
> +                            day_string = day_string.slice(0,-2).
> +                                         replace(/,(?= [^,]*$)/, ' ' + getRString("repeatDetailsAnd"));

nit: when wrapping on a dot, the dot should start the second line instead of ending the first
Comment 10 Decathlon 2013-02-18 09:35:41 PST
(In reply to Matthew Mecca [:mmecca] from comment #9)

> nit: when wrapping on a dot, the dot should start the second line instead of
> ending the first

Fixed in the changeset.

Pushed to comm-central changeset ceeb14e60750


Note You need to log in before you can comment on or make changes to this bug.