java - Converting TimeUnit to ChronoUnit? -
java 8 introduced chronounit largely equivalent timeunit introduced in java 5.
is there existing function converting timeunit chronounit? (yes, know how write own)
at 1 stage during development, could build duration
timeunit
. https://github.com/threeten/threeten/blob/3b4c40e3e7a5dd7a4993ee19e1c156e4e65432b3/src/main/java/javax/time/duration.java#l293 removed final version of code in java se 8.
i don't know of pre-packaged routine conversion, should added threeten-extra, in temporals
.
update: fixed https://github.com/threeten/threeten-extra/issues/22
java java-time
No comments:
Post a Comment