date of, value of first DATE line
place of, value of first PLAC line
year or, 1st string of 3-4 digits in 1st DATE line
date and place, values of 1st DATE and PLAC lines
date and place of, abbreviated from
returns the `event' of the current date
set day format for stddate calls
set month format for stddate calls
set date format for stddate calls
date of, in current format
These functions extract information about the dates and places of events.
Date returns the value of the first DATE line in an event, a node in a GEDCOM record tree. Date finds the first DATE line one level deeper than the event node. Place returns the value of the first PLAC line in an event. Year returns the first three or four digit number in the value of the first DATE line in an event; this number is assumed to be the year of the event.
Long returns the verbatim values of the first DATE and PLAC lines in an event, catenated together and separated by a comma. Short abbreviates information from the first DATE and PLAC lines, catenates the shortened information together with a comma separator and returns it. An abbreviated date is its year; an abbreviated place is the last component in the value, further abbreviated if the component has an entry in the place abbreviation table.
Gettoday creates an event that has today's date in the DATE line.
The last four functions are used to format dates in a variety of ways. Dayformat, monthformat, and dateformat select style options for formatting the day, month, and overall date structure; stddate returns dates in the selected style. The day format codes passed to dayformat are:
leave space before single digit days
use leading 0 before single digit days
no space or leading 0 before single digit days
The month format codes passed to monthformat are:
number with space before single digit months
number with leading zero before single digit months
number with no space or zero before single digit months
upper case abbreviation (eg, JAN, FEB)
capitalized abbreviation (eg, Jan, Feb)
upper case full word (eg, JANUARY, FEBRUARY)
capitalized full word (eg, January, February)
The full date formats passed to stddate are:
da mo yr
mo da, yr
mo/da/yr
da/mo/yr
mo-da-yr
da-mo-yr
modayr
damoyr
yr mo da
yr/mo/da
yr-mo-da
yrmoda
yr (year only, omitting all else)