2. The Directory Server Access Control Model
3. Understanding the Directory Server Schema
Matching Rule Description Format
Understanding Attribute Syntaxes
The Attribute Syntax Description Format
Commonly Used Attribute Syntaxes
The Pattern-Matching Syntax Extension
The Enumeration Syntax Extension
Attribute Type Description Format
Object Class Description Format
Directory Server Object Class Implementation
Understanding DIT Content Rules
DIT Content Rule Description Format
DIT Content Rule Implementation
Understanding DIT Structure Rules
DIT Structure Rule Description Format
DIT Structure Rules and Multiple Schemas
Understanding Matching Rule Uses
4. Directory Server Index Databases
5. Understanding Directory Server Plug-Ins
6. Directory Server Replication
OpenDS provides the partialDateAndTimeMatchingRule matching rule for performing a substring match on dates in GeneralizedTime attributes:
( 1.3.6.1.4.1.26027.1.4.7 NAME 'partialDateAndTimeMatchingRule' SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 )
This matching rule applies to attributes with a GeneralizedTime syntax, but the value is not a generalized time. Instead, it specifies a pattern for the date, composed of one or more sequences of an integer followed by a tag. The currently supported tags are Y, M, D, h, m, and s .
The following examples use the attribute birthDate (described in http://tools.ietf.org/html/draft-gryphon-ldap-schema-vcard4-00) with the following definition:
attributeTypes: ( 1.3.6.1.4.1.33592.1.3.2 NAME 'birthDate' DESC 'birthday' EQUALITY generalizedTimeMatch ORDERING generalizedTimeOrderingMatch SYNTAX .3.6.1.4.1.1466.115.121.1.24 USAGE userApplications SINGLE-VALUE )
For example, the following filter matches all users born on September 21st.
(birthDate:1.3.6.1.4.1.26027.1.4.7:=09M21D)
As another example, the following filter matches all users born in 1965:
(birthDate:1.3.6.1.4.1.26027.1.4.7:=1965Y)
The following search operation returns all entries with a birthday the fourteenth day of any month:
$ ./ldapsearch -p 1389 -h localhost -D "cn=Directory Manager" -w password \ -b "dc=example,dc=com" \ "(birthDate:1.3.6.1.4.1.26027.1.4.7:=14D)" birthDate