Created
February 17, 2012 16:46
-
-
Save aredington/1854306 to your computer and use it in GitHub Desktop.
Problems with java.util.Calendar
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
(def cal (java.util.Calendar/getInstance)) | |
(.clear cal) | |
(.set cal java.util.Calendar/YEAR 2010) | |
(.set cal java.util.Calendar/MONTH 11) | |
(.set cal java.util.Calendar/WEEK_OF_YEAR 1) | |
(.getTime cal) | |
(if (= 2009 (.get cal java.util.Calendar/YEAR)) | |
(throw (IllegalStateException. "WTF? LOOK AT LINE 3!!!"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment