package com.javacodegeeks.groovy.date
class GroovyDateArithmetic {
static main(args) {
def date = new Date().parse("dd.MM.yyy", '18.05.1988')
def datePlus = date.clone()
def dateMinus = date.clone()
datePlus = datePlus + 5
println datePlus
The above code will print Mon May 23 00:00:00 EST 1988. How can I format the final result to produce Mon May 23 1988.
No comments:
Post a Comment