Skip to content

Commit

Permalink
add years and shorten identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
burdoto committed Dec 26, 2024
1 parent 7f57ffb commit f51a6ed
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/org/comroid/api/Polyfill.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ public final class Polyfill {
private static final Pattern DURATION_PATTERN = Pattern.compile(
"((?<amount>\\d+)(?<unit>[yMwdhms][oi]?n?))");
private static final Map<@Doc("secondsFactor") Long, @Doc("suffix") String> durationStringBase = Map.of(
1L, "sec", // minutes
60L, "min", // minutes
1L, "s", // minutes
60L, "m", // minutes
3600L, "h", // hours
86400L, "d", // days
604800L, "w" // weeks
604800L, "w", // weeks
220903200L, "y" // years
);
@Deprecated
public static final String UUID_PATTERN = RegExpUtil.UUID4.pattern();
Expand Down

0 comments on commit f51a6ed

Please sign in to comment.