这是一个Groovy方法:
use(groovy.time.TimeCategory) {
def today = new Date()
println today
12.times { i ->
println today - (i+1).months
}
}
Run Code Online (Sandbox Code Playgroud)
您可以在此处阅读有关Groovy日期的更多信息
归档时间: |
|
查看次数: |
547 次 |
最近记录: |