-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Use correct year for generated birthdays events #24108
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
Conversation
'X-APPLE-OMIT-YEAR' is not always present, at least iOS 12.4 uses the hard coded date of 1604 (the start of the gregorian calendar) when the year is unknown. cf. https://forums.bitfire.at/topic/2050/bday-without-year-for-vcard-3-0-if-server-drops-property-x-apple-omit-year and https://gitlab.com/CardBook/CardBook/-/issues/586 Signed-off-by: Sven Strickroth <[email protected]>
rullzer
left a comment
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.
oo man... 🍎
skjnldsv
left a comment
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.
🙈
| if ($originalYear == 1604) { | ||
| $originalYear = null; | ||
| $unknownYear = true; | ||
| $birthday = '1970-' . $dateParts['month'] . '-' . $dateParts['date']; |
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.
could be omitted as $originalYear = null; triggers if ($originalYear < 1970) { below?
Or it should be an elseif to be more explicit?
|
Thanks, please also backport this to NC19 |
|
/backport to stable19 |
|
/backport to stable20 |
'X-APPLE-OMIT-YEAR' is not always present, at least iOS 12.4 uses the hard coded date of 1604 when the year is unknown.
Without this PR people are shown as born in 1604 if not year is entered.
cf. https://forums.bitfire.at/topic/2050/bday-without-year-for-vcard-3-0-if-server-drops-property-x-apple-omit-year and https://gitlab.com/CardBook/CardBook/-/issues/586
Also needed for older Nextcloud versions such as 19