In a previous version of grails I was able to use the groovy enhanced version of java.util.Date found here here.
After upgrading to grails 4, all those methods throw no signature of method on java.util.Date. Somehow the groovy additions aren't being picked up.
def fdate=new Date();
out << fdate.format("MM/dd/yyyy")
//No signature of method: java.util.Date.format()
org.codehaus.groovy:groovy-dateutil
in your project?java.util.Date
. That class is poorly designed and long outdated. Instead useLocalDate
andDateTimeFormatter
, both from java.time, the modern Java date and time API.