I have a date object that holds a persons birthday. My code looks like:
def getAge(){
//birthday, birthYear, birthMonth, birthDayOfMonth are class level properties
def c= new GregorianCalendar(birthYear, birthMonth-1, birthDayOfMonth)
birthday = c.time
//What do I do now?
}
I need to return the age of the person. How do I do that in Groovy? The age only needs to be a integer.