Created
April 7, 2014 17:38
-
-
Save bdkosher/10024762 to your computer and use it in GitHub Desktop.
Groovy Categories without use() method. Thanks to http://stackoverflow.com/questions/5552180/use-groovy-category-implicitly-in-all-instance-methods-of-class
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
import groovy.time.TimeCategory | |
[Date, Integer].each { it.mixin(TimeCategory) } | |
println Date.parse('yyyy-MM-dd', '2014-04-04') + 1.months |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment