-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BirthdayCalendarGenerator #239
Conversation
BEGIN:VCARD | ||
VERSION:3.0 | ||
N:Gump;Forrest;;Mr. | ||
FN:Forrest Gump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😋
👍 for me. Good job! |
I wonder:
|
The only concern I have, is that I feel it might be better for this functionality to live outside of the vcard component. It's nice to keep the actual method that's in there, but perhaps there should be a separate BirthdayCalendarGenerator class. Two reasons:
|
VERSION:3.0 | ||
N:Gump;Forrest;;Mr. | ||
FN:Forrest Gump | ||
BDAY:19850407 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey that's my birthday! Are you calling me forest gump? :P
Regardless... you need to add a test for BDAY values without a year and without a month.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, no, I just added an easter egg and with your name it would have been too obvious. ;-)
It would also be real nice if you support |
Good idea with the BirthdayCalendarGenerator, now I also remember that we talked about this. =) |
|
* | ||
* @var int | ||
*/ | ||
protected $defaultYear = 1900; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, once #242 is merged, the year defined in $minDate
in the new Settings
class should be used instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if I came up with 1900 here... but I would actually suggest putting this a lot further in the future. Putting it on 1900 means that usually 115 recurrence instances will be created to calculate birthdays, and this will not be very efficient. I'd set it to 2010 I think.
Ready for review. |
|
* | ||
* @var int | ||
*/ | ||
protected $defaultYear = 2000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be a constant.
c89c3a7
to
2a62379
Compare
Thanks!
|
Looks like this can't get merged automatically though. Should I merge master into this branch or rebase on master? |
Merge master into this branch =) |
Done. |
# Conflicts: # CHANGELOG.md
Awesome! |
Awesome \o/. |
@@ -37,8 +37,12 @@ ChangeLog | |||
* #197: The `$children` property on components has been changed from `public` | |||
to `protected`. Use the `children()` method instead to get a flat list of | |||
objects. | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haaa damned, it is not supposed to be here 😉.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in fruux@87c6a50. Good.
No description provided.