LSShortDateFormat(date)
Last updated June 28, 2002
Version: 1 | Requires: CF5 | Library: DateLib
Description:
This function returns a date in a short form (such as mm/dd/yyyy or dd.mm.yyyy) based on your locale setting. Please note that CFMX now supports a mask of "short" that should be used instead of this UDF.
Return Values:
Returns a string.
Example:
<cfoutput>
Locale: #GetLocale()#<br>
LSDateFormat(): #LSDateFormat(Now())#<br>
LSShortDateFormat(): #LSShortDateFormat(Now())#
</cfoutput>
Parameters:
Name | Description | Required |
---|---|---|
date | The date to modify. | Yes |
Full UDF Source:
/**
* Return a date in a locale-specific short form.
*
* @param date The date to modify. (Required)
* @return Returns a string.
* @author Matthew Walker (matthew@cabbagetree.co.nz)
* @version 1, June 28, 2002
*/
function LSShortDateFormat(date) {
return LSDateFormat(date, ShortDateMask());
}
Search CFLib.org
Latest Additions
Raymond Camden added
QueryDeleteRows
November 04, 2017
Leigh added
nullPad
May 11, 2016
Raymond Camden added
stripHTML
May 10, 2016
Kevin Cotton added
date2ExcelDate
May 05, 2016
Raymond Camden added
CapFirst
April 25, 2016