|
|
|
| 26 March 2002 | VerboseDate() |
| Author | ScriptLogic Corporation |
| Action | Returns a verbose representation of a specific date. Example: "April 1st, 2001". |
| Syntax | VerboseDate ("date") |
| Parameters | |
| Remarks | Easily internationalized, simply by manipulating the elements of the $MonthNames array within the function. |
| Returns | A verbose representation (string) of the date passed to this function. |
| Dependencies | Ordinal() |
| Examples | ?"Good day, Welcome to the ACME Network." ?"Today is "+VerboseDate(@Date) |
| Source |
FUNCTION VerboseDate ($expd)
; accepts a date "yyyy/mm/dd" and returns "mmmmmmmm dd, yyyy".
DIM $y,$m,$d,$month,$monthnames[13]
$y=Val(Substr($expd,1,4))
$m=Val(Substr($expd,6,2))
$d=Val(Substr($expd,9,2))
$monthnames='0','January','February','March','April','May','June',
'July','August','September','October','November','December'
$month=$monthnames[$m]
$verbosedate='$month '+ordinal($d)+', $y'
ENDFUNCTION ; - VerboseDate -
|
|
|
|