pimutils / khal

:calendar: CLI calendar application
https://lostpackets.de/khal/
MIT License
2.61k stars 202 forks source link

Handling partial birthdays from vcf files #650

Open samdmarshall opened 7 years ago

samdmarshall commented 7 years ago

I have a bunch of contacts that I have birthdays stored for without their birth-year attached in my iCloud account. Apparently the way that Apple handles this is by exporting the VCF as the following:

BDAY;X-APPLE-OMIT-YEAR=1604:1604-05-09

This works fine in Apple's software, but not so much when attaching this to khal, as it will display their birth-year as 1604 (and thus, such contacts will be display as having their 413th birthday this year). I assume that Apple does this as a work-around to the official spec, and that there is no proper way to handle a date without a year attached to it. Since khal supports search a directory of .vcf files to get the birth date for each contact, is there a way to just have it display as "Jane Smith's Birthday" rather than "Jane Smith's 413th Birthday"?

Thanks.

geier commented 7 years ago

There actually is a way to deal with that in the standard, e.g., BDAY:--0415. I'm somewhat hesitant to support non-standard additions like this.

samdmarshall commented 7 years ago

My understanding is that only works for vcards using the 4.0 spec, not prior. I opened an issue on khard about this as well. The general consensus seems to be not wanting to support non-standard additions (which i totally understand and agree with).

geier commented 7 years ago

Oops, you are totally right, that really only works for vcard 4.0. Perhaps we should work around this issue therefore.

petr-fischer commented 7 years ago

+1

BEGIN:VCARD
VERSION:3.0
BDAY:1977-12-08
...

This birthday is not recognized. Also in documentation, there is:

If set to birthdays khal will expect a VCARD collection and extract birthdays from those VCARDS, that is only files with .ics extension will be considered, all other files will be ignored...

Is it realy .ics extension for VCARDS, not .vcf??? Thanks.

geier commented 7 years ago

Nope, this is an error in the documentation, thanks for spotting it.

geier commented 7 years ago

actually this has been fixed before (the vcf issue).

samdmarshall commented 5 years ago

hi, checking in to see status of this. i came across the problem again yesterday with khal claiming it was a friend of mine’s 416th birthday; is the only option here to make a workaround when this value is missing the year?