Facing a problem with using Natty library for converting string to date

42 Views Asked by At

I am trying to find dates in a text that I want to modify. I found that Natty library is helping with this which I didn't know anything about it. Especially click here to see what I based on. The problem is when I am copying the code from this mentioned link, for the below line NetBeans is showing me the below error:

List<Date> dates =new Parser().parse("Start date 11/30/2013 , end date Friday, Sept. 7, 2013").get(0).getDates();

` Error: Type List doesn't take parameters

I tried to take a look of this new library, I found out that parse() returns List<DataGroup>. I tried this also in my code, but the same error still exist.

I am importing the below for List:

import java.awt.List;  
import com.joestelmach.natty.*;  
import java.util.List.*;

Where am I doing mistake?

0

There are 0 best solutions below