jchronic
jchronic copied to clipboard
Natural language date parsing in Java, ported directly from Ruby's chronic
Using the code ``` Span d = Chronic.parse(date); ``` With date referring to the examples below. This doesn't parse (the variable d above returns null): ``` 2012-11-18 12:44:11 -0500 ```...
ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss'Z') is not being parsed at all.
Chronic.parse("2 days from now") returns null when running under Android. On the other hand Chronic.parse("tomorrow") works fine. works fine when running under the JVM
Here is an example. "2014-03-10 19:00" actually parses as 2014-03-09 19:00. ``` import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; import org.junit.Test; import com.mdimension.jchronic.Chronic; import com.mdimension.jchronic.Options;...
When parsing "last sunday", with the default timezone set to UTC+1 and options.now set to UTC, the resulting date is Sun 10AM UTC+1, not Sun 12AM UTC as I would...
Hi - I just picked up this class and it looks quite good, but I would really like some end user documentation on the allowed formats and how they correspond...