Java library for Elastic Date Math

Is there a Java library that converts Elastic accepted Date Math expressions ('now', 'now-1y/d') to a Java Date object? I have a case where we accept the Elastic Date Math as we pass this along to Elastic but there is another case within this flow when it won't be sent to Elastic and instead I need to perform date functions within Java with this input.

Hey,

this is an internal class of Elasticsearch, see https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/common/time/JavaDateMathParser.java

--Alex

Thank you!