Are there any libraries for Java that allow you to interpret dates like "Yesterday", "Next Monday", ...
Asked
Active
Viewed 2,783 times
8
-
1Do you mean the string literals, or just something that makes it easy to walk a date back a day or figure out the date of the first Monday in the future, but not providing the text parsing of a literal "Next Monday?" – Yishai Jul 27 '09 at 15:23
3 Answers
4

Michael Mior
- 28,107
- 9
- 89
- 113

pathikrit
- 32,469
- 37
- 142
- 221
-
1Might be worth noting that as of March 2021 (this comment), Natty has not been updated for 4 years. https://github.com/joestelmach/natty – Michael Mior Mar 25 '21 at 17:49
1
A library like Joda-Time is probably as close as you're gonna get. It doesn't convert strings, but offers much more functionality than the Java default Date
class.
Here is a utility class that provides some of the functions you're looking for, but again without fuzzy string conversion.

Daniel F. Thornton
- 3,687
- 2
- 28
- 41