public final class DurationUtils extends Object
DurationUtils together with DurationStyle is to support Boot
2.x style expressions while we're still staying on Boot 1.x. This is meant to
provide smooth upgrade path by not breaking expression formats exposed to
user.| Constructor and Description |
|---|
DurationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Duration |
convert(String expression)
Converts a duration expression into
Duration. |
static Duration |
convert(String expression,
ChronoUnit unit)
Converts a duration expression into
Duration with a given
ChronoUnit. |
public static Duration convert(String expression)
Duration.expression - the duration expressionpublic static Duration convert(String expression, ChronoUnit unit)
Duration with a given
ChronoUnit.expression - the duration expressionunit - the chrono unitCopyright © 2021 Pivotal Software, Inc.. All rights reserved.