It would make sense to have a common utility to parse java.time.Duration
from a CharSequence
.
Examples:
* 10ms
-> 10 milliseconds
* 10s
-> 10 seconds
* 10m
-> 10 minutes
* 10h
-> 10 hours
ChronoUnit
s to support:
* Nanos
* Micros
* Millis
* Seconds
* Minutes
* Hours
* Days
Spring Boot provides this functionality and we'd like to reuse it in Spring Data.
Comment From: ilyavy
Relates to #22013
Comment From: rstoyanchev
Team Decision: We can do this in fallback mode, trying the built-in Duration
formatting, and then falling back on alternative formats, in effect extending the built-in one. We should ensure the spec of what Boot supports already, works in the new arrangement.
Comment From: simonbasle
linked to #22013 and superseded by gh-30396