Created
September 5, 2013 14:33
-
-
Save fumokmm/6450938 to your computer and use it in GitHub Desktop.
Groovyでn日前の日付を求める ref: http://qiita.com/fumokmm/items/94c6ed2f26803aab704e
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 beforeN(int n) { | |
new Date() - n | |
} | |
// 例: 100日前 | |
println beforeN(100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment