Be Good, Paladin
~ Believe in Good ~
Saturday, September 12, 2009
To remember
From a conversation on the grails list, but I keep forgetting about this ability in groovy, so I'll paste it here so I remember it and research it.
Date.metaClass.getAge = { new Date().year - delegate.year }
println new Date(79, 11, 17).age
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment