| Name | Type | Options | Opt/Req | Description |
| relativePosition | 10a | Const | Req | The relative position of the date you want to find. Acceptable values are 'first', 'last', and 'next'. Case insensitive. Returns '0001-01-01' if invalid value sent. |
| dayName | 10a | Const | Req | The day of the week you want to find. Acceptable values are 'mon', 'monday', 'tue', 'tuesday', 'wed', 'wednesday', 'thu', 'thursday', 'fri', 'friday', 'sat', 'saturday', 'sun', 'sunday' . Case insensitive. Returns '0001-01-01' if invalid value sent. |
| monthOrYear | 5i 0 | Const | Opt | The month or year.
A shorthand version of the procedure: ex:findDate( 'first' : 'monday' : 12 ) would return the first Monday in the next December. ex:findDate( 'last' : 'wed' : 2003 ) would return the last wednesday of 2003, and so on.
If relPos is 'first' or 'last', a month or year must be specified to limit the search. For instance, findDate( 'last' : 'fri' : 2003 ) would return the last friday of 2003. If the YEAR is used it must be the 4 digit year!!! The function will not process if this parm is not sent with 'first' or 'last' or if 0 is specified. If 'next' is specified, the month or year MAY be specified. |
| specificYear | 5i 0 | Const | Opt | A specific year. This is the longhand form of the procedure but provides the most flexibility. This approach allows you to specify both the month and the year and as such it works for past dates as well as future ones. ex: findDate( 'last' : 'fri' : 7 : 2006 ) will return the last friday of July 2006. |
| Returns: | D | n/a | n/a | The found Date. Returns '0001-01-01' in case of error. |