not a Splunk problem, but this community is most likely to have an answer....
I have a non-Splunk related utility we're putting together, and we need to specify start and end times. It turns out the use cases are pretty much the same as they are for Splunk time modifiers... so...
Has anyone seen Java code that can parse and interpret Splunk time modifiers?
Maybe you can find something here: http://dev.splunk.com/java
I was hoping so, but the client libraries don't seem to do any parsing; it appears that they just pass them along to Splunk unchanged....