@rfc2822 said in Date types in CardDAV contacts:
Thanks for your suggestion! Syncing data with X-PROPERTIES should be possible and I think it would be a good feature.
Do you know what we have to add to contacts.xml?
From the Android docs, I would think that
<DataKind kind="event" dateWithTime="false" > <Type maxOccurs="1" type="birthday" yearOptional="true" /> <Type maxOccurs="1" type="anniversary" yearOptional="true" /> </DataKind>should change to
<DataKind kind="event" dateWithTime="false" > <Type maxOccurs="1" type="birthday" yearOptional="true" /> <Type type="anniversary" yearOptional="true" /> <Type type="other" yearOptional="true" /> <Type type="custom" yearOptional="true" /> </DataKind>I’m not completely sure about the custom type. All of these are Android standard, so I’m somewhat surprised they even need to be specified to show up. (BTW: google contacts use all of them, that’s a good way to check and compare.)
What do you suggest how these dates (OTHER and CUSTOM) should be represented in the vCard?
I did not see these among other users of x properties (mozilla, evolution etc.). So X-DAVX5-EVENTOTHER and X-DAVX5-EVENTCUSTOM may be it. The content format would be the same as for the other two types.
Now for the label for the custom type, if we follow what the mozilla addressbook does: For a custom event like 2021-01-17 derive an item id (maybe 2020117) and specify a label FirstShow in vcard as X-DAVX5-EVENTCUSTOM-20210117.LABEL:FirstShow. Maybe the id should be derived differently to allow different entries for the same day. (And maybe the label for an x property needs to be X-EVENTLABEL or such).
Side note: There is a DEATHDATE in RFC 6474 which is not accepted yet. With aCalender+ and carddav-sync I noticed the following: if I enter a custom event with label Todestag then it shows up in aCalendars’s event list with a special icon. I have no clue who in the chain (carddav-sync provider, Android, aCalendar) recognizes that localized custom label. I don’t think the sync provider is involved. So, even without syncing (but with a different contacts.xml) this could work, too.