groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "杨波" <bo.y...@telecwin.com>
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
Hello,

The doucment of "http://groovy-lang.org/groovy-dev-kit.html#_working_with_legacy_date_calendar_types"
says:
"""
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

Mime
View raw message