Using PROPERTIES, dates currently must be specified in "YYYY-MM-DD" format. Other format will be supported in the future. Using description list, dates can be specified using normal Org timestamps (repeaters and warning periods will be ignored).

By convention, if year is '1900' it is assumed to mean year is not specified.

By default, all contacts' anniversaries will be listed. You can filter contacts using tags ('has_tags' and 'lacks_tags' options), or by 'due_in' and 'max_overdue' options (due_in=14 and max_overdue=2 is what I commonly use in my startup script).

This function is not exported by default, but exportable.

Arguments ('*' denotes required arguments):

due_in => int

Only show anniversaries that are due in this number of days.

field_pattern => str (default: "(?:birthday|anniversary)")

Field regex that specifies anniversaries.

files* => array[str]

has_tags => array[str]

Filter headlines that have the specified tags.

lacks_tags => array[str]

Filter headlines that don't have the specified tags.

max_overdue => int

Don't show dates that are overdue more than this number of days.

sort => str|code (default: "due_date")

Specify sorting.

If string, must be one of 'date', '-date' (descending).

If code, sorting code will get [REC, DUE_DATE] as the items to compare, where REC is the final record that will be returned as final result (can be a string or a hash, if 'detail' is enabled), and DUE_DATE is the DateTime object.

time_zone => str

Will be passed to parser's options.

If not set, TZ environment variable will be picked as default.

today => obj

Assume today's date.

You can provide Unix timestamp or DateTime object. If you provide a DateTime object, remember to set the correct time zone.

Returns an enveloped result (an array).

First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (result) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.