Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Date/Birthday fields and LDAP schemas

4,848 views
Skip to first unread message

Mark Banner

unread,
Nov 25, 2008, 4:08:35 AM11/25/08
to
In Thunderbird we have recently added the capability to store/display
birthdays in the address book. What isn't supported yet is using it
within LDAP address books.

I had a look around at the various LDAP schemas a while back and
couldn't find any date/birthday format already defined. Although having
just thought about it again, I guess the modifytimestamp is a date field.

Even so, does anyone know of existing schemas that define a birthday
field and/or date format? I'd like to see if we can use something that
already exists rather than define our own.

Standard8

Michael Ströder

unread,
Nov 25, 2008, 5:12:52 AM11/25/08
to
Mark Banner wrote:
> I had a look around at the various LDAP schemas a while back and
> couldn't find any date/birthday format already defined.

There are several with different syntaxes used. So it's still a common
problem. :-/

> Although having
> just thought about it again, I guess the modifytimestamp is a date field.

First one should avoid using the LDAP syntax GeneralizedTime (e.g. used
for modifytimestamp) for an attribute storing date of birth since in
most cases the date of birth is only known without a time (and time
zone) and therefore a correct equality matching would not be feasible.
This directly rules out the definition of attribute type dateOfBirth in
RFC 2985.

> Even so, does anyone know of existing schemas that define a birthday
> field and/or date format? I'd like to see if we can use something that
> already exists rather than define our own.

Personally I'm using a custom attribute type in my own OID arc with
YYYY-MM-DD as defined in ISO 8601 (based on LDAP syntax IA5String).

Others (e.g. SCHAC) are using a syntax like YYYYMMDD (based on LDAP
syntax NumericString).

Ciao, Michael.

Anton Bobrov

unread,
Nov 25, 2008, 6:04:48 AM11/25/08
to Mark Banner, dev-te...@lists.mozilla.org

Evolution project has this schema of their own

http://svn.gnome.org/viewvc/evolution-data-server/trunk/addressbook/backends/ldap/evolutionperson.schema?view=markup

and there is also Sun Messaging Server and Calendar Server schema

http://docs.sun.com/app/docs/doc/819-4437/anobm?a=view
http://docs.sun.com/app/docs/doc/819-4437/6n6jckqrt?a=view

these are the ones i know that define date of birth and similar
additional data. worth having a look and supporting but neither
is standard. Microsoft must have something similar of their own
defined as well.

Mark Banner

unread,
Nov 25, 2008, 8:11:52 AM11/25/08
to
On 11/25/2008 10:12, Michael Ströder wrote:
> Mark Banner wrote:
>> I had a look around at the various LDAP schemas a while back and
>> couldn't find any date/birthday format already defined.
>
> There are several with different syntaxes used. So it's still a common
> problem. :-/
>
>> Although having just thought about it again, I guess the
>> modifytimestamp is a date field.
>
> First one should avoid using the LDAP syntax GeneralizedTime (e.g. used
> for modifytimestamp) for an attribute storing date of birth since in
> most cases the date of birth is only known without a time (and time
> zone) and therefore a correct equality matching would not be feasible.
> This directly rules out the definition of attribute type dateOfBirth in
> RFC 2985.

Thanks for the reminder/warning.

Standard8

Mark Banner

unread,
Nov 25, 2008, 8:31:54 AM11/25/08
to
On 11/25/2008 11:04, Anton Bobrov wrote:
>
> Evolution project has this schema of their own
>
> http://svn.gnome.org/viewvc/evolution-data-server/trunk/addressbook/backends/ldap/evolutionperson.schema?view=markup

Thanks for the pointer, I've just done some digging and they seem to
accept YYYYMMDD or YYYY-MM-DD into birthDate

This is YYYYMMDD on field dateOfBirth

> these are the ones i know that define date of birth and similar
> additional data. worth having a look and supporting but neither
> is standard. Microsoft must have something similar of their own
> defined as well.

schac (as pointed to by Michael's email) also uses YYYYMMDD and calls it
schacDateOfBirth.

Then remembering openLDAP has some schemas installed. I've also found:

apple.schema:

attributetype (
1.3.6.1.4.1.63.1000.1.1.1.1.27
NAME ( 'apple-birthday' )
DESC 'Birthday'
EQUALITY generalizedTimeMatch
SUBSTR caseExactIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE )

The microsoft schmeas only appear to have birthLocation. I also can't
find anything searching on the web.

At the moment I'm very tempted to go with YYYYMMDD in a NumberString,
and probably default to dateOfBirth, but allow birthDate and
schacDateOfBirth by default.

Standard8

Michael Ströder

unread,
Nov 25, 2008, 8:40:08 AM11/25/08
to

Hmm, this document says nothing about the format. LDAP syntax is
DirectoryString, so any UTF-8-encoded Unicode string can be stuffed
there. I suspect this is rather free-form.

Ciao, Michael.

Michael Ströder

unread,
Nov 25, 2008, 12:22:28 PM11/25/08
to
Mark Banner wrote:
> At the moment I'm very tempted to go with YYYYMMDD in a NumberString,

I also used this but it's not a readable representation for normal
users. So I switched back to YYYY-MM-DD which is an official date
representation defined in ISO 8601 and can therefore be directly used.

Ciao, Michael.

Anton Bobrov

unread,
Nov 25, 2008, 1:25:21 PM11/25/08
to Mark Banner, dev-te...@lists.mozilla.org

Mark Banner wrote:

> At the moment I'm very tempted to go with YYYYMMDD in a NumberString,
> and probably default to dateOfBirth, but allow birthDate and
> schacDateOfBirth by default.

sounds reasonable to me although NumericString doesnt buy you much here
eg somebody can specify "YYYY MM DD" but not "YYYY-MM-DD" and since
theres no suitable standard syntax to use here maybe IA5 or Directory
String where you can be more flexible in terms of what you accept and
then parse according to formatting rules you intend to support.

0 new messages