Skip to content

Instantly share code, notes, and snippets.

@aredington
Created February 17, 2012 16:46
Show Gist options
  • Save aredington/1854306 to your computer and use it in GitHub Desktop.
Save aredington/1854306 to your computer and use it in GitHub Desktop.
Problems with java.util.Calendar
(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