PHP Classes

BDAY and Gender not correct?

Recommend this page to a friend!

      PHP vCard Library  >  All threads  >  BDAY and Gender not correct?  >  (Un) Subscribe thread alerts  
Subject:BDAY and Gender not correct?
Summary:possible convert problems
Date:2023-03-08 15:54:20

  1. BDAY and Gender not correct?   Reply   Report abuse  
Picture of tutu2 tutu2 - 2023-03-08 15:54:20
Hi, great work. Only having a bit trouble do get the birthday and gender correctly.

In my vcard that I wanted to parse it says:

But the gender and birthday seem not to convert correctly
back into php strings.

  2. Re: BDAY and Gender not correct?   Reply   Report abuse  
Picture of Stefan Kientzler Stefan Kientzler - 2023-03-09 13:43:24 - In reply to message 1 from tutu2
Hi tutu,

you're right but take in account
1. in vCard Version v3.0 the BDAY property shoud be in ISO Date Format
... the format you try to parse contains no separators (19800517), what is the specification of vCard Version v2.1

2. The GENDER property is introduced first in vCard Version v4.0

But anyway - I have implemented both variants in the package, although the package actually only supports vCard v3.0:
- BDAY without separators are converted to correct Date value
- The GENDER and X-GENDER property is now supported (return value is always the GENDER Format)

Could you tell me, from which Source the data comes that you try to parse? I have in mind maybe to implement full support of vCard Version v4.0. But since I haven't found any program or application that generates data in this version and I don't have any customer with the corresponding requirement so far, I don't see a need for it yet, but keep an eye on it...

The package here on phpClasses is directly connected to the origin on github but i don't know how long it last until the package is updated automatically - so if you want to get the actual version feel free to get it from