Created
August 20, 2022 00:23
-
-
Save trycf/8aed899d7dfb1080932b9b06e065d47c to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains hidden or 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
| <CFOBJECT ACTION="CREATE" TYPE="Java" | |
| CLASS="java.util.GregorianCalendar" NAME="myCalendar"> | |
| <CFSET is2001LeapYear = myCalendar.isLeapYear(2001)> | |
| <CFSET theYear = myCalendar.get(myCalendar.YEAR)> | |
| <CFSET theMonth = myCalendar.get(myCalendar.MONTH) + 1> | |
| <CFSET theDay = myCalendar.get(myCalendar.DATE)> | |
| <cfoutput> | |
| <html> | |
| <body>Is 2001 a leap-year? <b>#is2001LeapYear#</b> | |
| <p>Today is the <b>#theMonth# / #theDay# / #theYear#</b> | |
| </body> | |
| </html> | |
| </cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment