Why can't I get a duration in minutes or hours in java.time?

后端 未结 6 2128
故里飘歌
故里飘歌 2020-11-29 02:22

Of the Duration class in the new JSR 310 date API (java.time package) available in Java 8 and later, the javadoc says :

This class models a quantity o

6条回答
  •  再見小時候
    2020-11-29 03:19

    Remove Hourse then get minutes

    long hours = attendanceDuration.toHours(); long minutes = attendanceDuration.minusHours(hours).toMinutes();

提交回复
热议问题