CFLib.org – Common Function Library Project

LSShortDateFormat(date)

Last updated June 28, 2002

author

Matthew Walker

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());
}
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson