Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trycf/70e33c5b31ee59b4edad6af26f479f58 to your computer and use it in GitHub Desktop.
Save trycf/70e33c5b31ee59b4edad6af26f479f58 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
var = DateFormat(now());
var date = DateFormat(DateAdd("d", 11, now()), 'mm/dd/yyy' );
var month = Month(date);
var year = Year(date);
var day = Day(date);
var daysInMonth = DaysInMonth(date);
var daysInYear = daysInYear(date);
if (day == 29 && month == 8 && daysInYear == 365){
}
if (day == 31 && month == 8 && daysInYear == 365){
}
if (day == 29 && month == 8 && daysInYear == 365){
}
WriteDump(
"#daysInYear#"
);
var monthsAgo = month - 6;
WriteDump(
"#month#/#day#/#year# - #daysInMonth#"
);
WriteDump(
"#monthsAgo#/#day#/#year# - #daysInMonth#"
);
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment