Skip to content

Instantly share code, notes, and snippets.

Created May 7, 2015 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/507b1d0a6d1ada36a1ec to your computer and use it in GitHub Desktop.
Save anonymous/507b1d0a6d1ada36a1ec to your computer and use it in GitHub Desktop.
TryCF Gist
<cfset form.startdate = '01/07/2015'>
<cfoutput>
Locale: #getLocale()#<br>
form: #form.startdate#<br>
US: #dateformat(form.startdate, "MM-DD-YYYY")#<br>
AU: #dateformat(form.startdate, "DD-MM-YYYY")#<br>
ISO: #dateformat(form.startdate, "YYYY-MM-DD")#<br><br>
</cfoutput>
<cfset tmp = SetLocale('English (Australian)')>
<cfoutput>
Locale: #getLocale()#<br>
form: #form.startdate#<br>
US: #dateformat(form.startdate, "MM-DD-YYYY")#<br>
AU: #dateformat(form.startdate, "DD-MM-YYYY")#<br>
ISO: #dateformat(form.startdate, "YYYY-MM-DD")#<br><br>
</cfoutput>
<cfoutput>
Locale: #getLocale()#<br>
form: #form.startdate#<br>
US: #LSDateFormat(form.startdate, "MM-DD-YYYY")#<br>
AU: #LSDateFormat(form.startdate, "DD-MM-YYYY")#<br>
ISO: #LSDateFormat(form.startdate, "YYYY-MM-DD")#<br>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment