groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "杨波" <>
Subject Is there no any more Date.parse(pattern, date_string) methods like Groovy User Guide Document says?
Date Thu, 27 Feb 2020 07:30:05 GMT

The doucment of ""
You can parse strings into dates and output dates into formatted strings:
def orig = '2000-01-01'
def newYear = Date.parse('yyyy-MM-dd', orig)

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?

Best Regards,

Bob Yang

View raw message