LegacyDate::toString - jcobban/Genealogy GitHub Wiki
$date‑>toString($privlim, $needon, $tranTab)
Up: class LegacyDate
This returns an external human readable version of the date as a string. If the year portion of the date is after the privacy limit year, then this method returns "Private".
This method takes three parameters:
parameter | description |
---|---|
$privlim | the latest year that may be displayed. Dates after this year are displayed as "Private". Defaults to no privacy limit. |
$needon | if true then simple dates are prefixed by 'in' or 'on' as required by language convention. For example “in 1884” versus “on 12 December 1902”. Defaults to false. |
$trantab | language-specific translate table for text. This is an associative array in which the key is an English word used in expressing dates and the value is the translation into another language. Defaults to no translation. The recommended way for a script to obtain this translation table is from the language-specific template $template->getTranslate()['tranTab']. |
Next: class Record