Created
September 20, 2022 07:06
-
-
Save trycf/da4a8e0ce9451cdec632f47ec1c4fe44 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- <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