Skip to content

Instantly share code, notes, and snippets.

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 trycf/da4a8e0ce9451cdec632f47ec1c4fe44 to your computer and use it in GitHub Desktop.
Save trycf/da4a8e0ce9451cdec632f47ec1c4fe44 to your computer and use it in GitHub Desktop.
TryCF Gist
<!--- <cfdump var="#getLocale()#"> --->
<cfdump var="#getLocale()#">
<cfset SetLocale("de_CH")>
<cfset past_date = "#LSDateFormat("11.10.2014", "dd. mmm yyyy")# #LSTimeFormat("01:00")#">
<cfdump var="#past_date#">
<cfset current_date = "#LSDateFormat(Now(), "dd. mmm yyyy")# #LSTimeFormat(Now())#">
<cfdump var="#current_date#">
<!--- works in Lucee --->
<cfset diff_months = DateDiff("m", lsparseDateTime(date="#past_date#", format="dd. MMM yyyy hh:mm"), lsparseDateTime(date="#current_date#", format="dd. MMM yyyy hh:mm") ) >
<cfdump var="#diff_months#">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment