周数
dayjs.duration().weeks();
dayjs.duration().asWeeks();
与持续时间的其他获取器一样,dayjs.duration().weeks()
获得周数 (0 - 4)。
¥As with the other getters for durations, dayjs.duration().weeks()
gets the weeks (0 - 4).
dayjs.duration().asWeeks()
获取持续时间的长度(以周为单位)。
¥dayjs.duration().asWeeks()
gets the length of the duration in weeks.
请注意,与持续时间的其他获取器不同,周被算作天数的子集,并且不会从天数中扣除。
¥Pay attention that unlike the other getters for duration, weeks are counted as a subset of the days, and are not taken off the days count.
注意:以周为单位的持续时间长度定义为 7 天。
¥Note: The length of a duration in weeks is defined as 7 days.