Simple-Contacts icon indicating copy to clipboard operation
Simple-Contacts copied to clipboard

Birthday with "Hide year" enabled in a contact does not include in the exported vcf file

Open Guru-25 opened this issue 4 years ago • 4 comments

To reproduce:

  1. Add any date in Birthday field in a contact with "Hide year" option enabled.
  2. export the .vcf file and open it with a text editor, BDAY column will be empty

Version: 6.15.0 Pro (Installed from Github releases)

Guru-25 avatar Aug 01 '21 15:08 Guru-25

@tibbi This is caused by PartialDate being only supported in vCard v4.0. But not all other apps support this version. For example, Google's default Contact app doesn't. So we have 2 options:

  1. Export partial dates inside v4.0 vCard version, but then some other apps will display the date as "--mmdd".
  2. Export partial dates inside v3.0 vCard version as usual dates but with the year 1900.

Simple Contacts will handle import correctly in any case.

Of course, we can give user the option to choose between export versions but that would complicate UX.

Here you can see the difference after importing the .vcf file in Google Contacts:

  1. vCard v.4.0 Screenshot_20210829-155242r
  2. vCard v.3.0 screenshot_20210829-155224r

qwertyfinger avatar Aug 29 '21 13:08 qwertyfinger

we use version 3, so lets make it 1900 then

tibbi avatar Aug 29 '21 13:08 tibbi

For more clarity:

  1. v3 approach: https://github.com/SimpleMobileTools/Simple-Contacts/compare/master...qwertyfinger:partial-date-export-v3
  2. v4 approach: https://github.com/SimpleMobileTools/Simple-Contacts/compare/master...qwertyfinger:partial-date-export-v4

qwertyfinger avatar Aug 29 '21 13:08 qwertyfinger

If we want to switch to v4, we have to do proper testing of every single field. You cannot just toggle it like this and hope that nothing will break. Lets stick to v3 for now.

tibbi avatar Aug 29 '21 13:08 tibbi