By adding this JAR to gradle, it works.

    implementation 'org.codehaus.groovy:groovy-dateutil:2.5.9'

It's clear, because "implementation 'org.codehaus.groovy:groovy-all:2.5.9'" 
does not depends on groovy-dateutil, so we should manually add this JAR 
dependency.

Thanks Mauro!


------------------------------------------------------------------
发件人:Mauro Molinari <mauro...@tiscali.it>
发送时间:2020年2月27日(星期四) 17:19
收件人:users <users@groovy.apache.org>
主 题:Re: Is there no any more Date.parse(pattern, date_string) methods like 
Groovy User Guide Document says?

Il 27/02/2020 08:30, 杨波 ha scritto:
But when I use Groovy 2.5.9, there is no such Date.parse(pattern, date_str) 
method. 
Instead I found the LocateDate.parse(date_str, pattern) method.

Is it the document outdated or I use something wrong?
Ensure you have groovy-dateutil JAR in your classpath. It contains 
org.apache.groovy.dateutil.extensions.DateUtilStaticExtensions which provides 
the mentioned method.
Mauro

Reply via email to