public class DateTimeConverterUtil extends Object
Modifier and Type | Method and Description |
---|---|
static long |
dayToHour(long num)
单位转换,天转小时
|
static long |
dayToMillisecond(long num)
单位转换,天转毫秒
|
static long |
dayToMinute(long num)
单位转换,天转分钟
|
static long |
dayToSecond(long num)
单位转换,天转秒
|
static long |
hourToDay(long num)
单位转换,小时转天
|
static BigDecimal |
hourToDayPrecise(long num)
小时转天,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static String |
hourToDayPreciseString(long num)
小时转天,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数 ,返回字符串,去掉尾部多余0
|
static long |
hourToMillisecond(long num)
单位转换,小时转毫秒
|
static long |
hourToMinute(long num)
单位转换,小时转分钟
|
static long |
hourToSecond(long num)
单位转换,小时转秒
|
static long |
millisecondToDay(long num)
单位转换,毫秒转天
|
static BigDecimal |
millisecondToDayPrecise(long num)
毫秒转天,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static String |
millisecondToDayPreciseString(long num)
毫秒转天,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数,返回字符串,去掉尾部多余0
|
static long |
millisecondToHour(long num)
单位转换,毫秒转小时
|
static BigDecimal |
millisecondToHourPrecise(long num)
毫秒转小时,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static String |
millisecondToHourPreciseString(long num)
毫秒转小时,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数,返回字符串,去掉尾部多余0
|
static long |
millisecondToMinute(long num)
单位转换,毫秒转分钟
|
static BigDecimal |
millisecondToMinutePrecise(long num)
毫秒转分钟,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static String |
millisecondToMinutePreciseString(long num)
毫秒转分钟,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static long |
millisecondToSecond(long num)
单位转换,毫秒转秒
|
static BigDecimal |
millisecondToSecondPrecise(long num)
毫秒转秒,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static String |
millisecondToSecondPreciseString(long num)
毫秒转秒,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数,返回字符串,去掉尾部多余0
|
static BigDecimal |
millisecondToSecondPreciseThree(long num)
毫秒转秒,精确计算,保留3位小数,ROUND_DOWN 舍去多余小数
|
static String |
millisecondToSecondPreciseThreePlainString(long num)
毫秒转秒,精确计算,保留3位小数,ROUND_DOWN 舍去多余小数,返回原始字符串
|
static String |
millisecondToSecondPreciseThreeString(long num)
毫秒转秒,精确计算,保留3位小数,ROUND_DOWN 舍去多余小数,返回字符串,去掉尾部多余0
|
static long |
minuteToDay(long num)
单位转换,分钟转天
|
static BigDecimal |
minuteToDayPrecise(long num)
分钟转天,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static String |
minuteToDayPreciseString(long num)
分钟转天,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数,返回字符串,去掉尾部多余0
|
static long |
minuteToHour(long num)
单位转换,分钟转小时
|
static BigDecimal |
minuteToHourPrecise(long num)
分钟转小时,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static String |
minuteToHourPreciseString(long num)
分钟转小时,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数,返回字符串,去掉尾部多余0
|
static long |
minuteToMillisecond(long num)
单位转换,分钟转毫秒
|
static long |
minuteToSecond(long num)
单位转换,分钟转秒
|
static long |
secondToDay(long num)
单位转换,秒转天
|
static BigDecimal |
secondToDayPrecise(long num)
秒转天,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static String |
secondToDayPreciseString(long num)
秒转天,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数,返回字符串,去掉尾部多余0
|
static long |
secondToHour(long num)
单位转换,秒转小时
|
static BigDecimal |
secondToHourPrecise(long num)
秒转小时,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static String |
secondToHourPreciseString(long num)
秒转小时,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数,返回字符串,去掉尾部多余0
|
static long |
secondToMillisecond(long num)
单位转换,秒转毫秒
|
static long |
secondToMinute(long num)
单位转换,秒转分钟
|
static BigDecimal |
secondToMinutePrecise(long num)
秒转分钟,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static String |
secondToMinutePreciseString(long num)
秒转分钟,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数,返回字符串,去掉尾部多余0
|
static Date |
toDate(Instant instant)
Instant转Date
|
static Date |
toDate(LocalDate localDate)
LocalDate转Date
|
static Date |
toDate(LocalDateTime localDateTime)
LocalDateTime转Date
|
static Date |
toDate(LocalTime localTime)
LocalTime转Date
以当天的日期+LocalTime组成新的LocalDateTime转换为Date
|
static Date |
toDate(long epochMilli)
时间戳epochMilli毫秒转Date
|
static Date |
toDate(TemporalAccessor temporal)
temporal转Date
|
static Date |
toDate(YearMonth yearMonth,
int dayOfMonth)
YearMonth转Date
注意dayOfMonth范围:1到31之间,最大值根据月份确定特殊情况,如2月闰年29,非闰年28
如果要转换为当月最后一天,可以使用下面方法:toDateEndOfMonth(YearMonth)
|
static Date |
toDate(ZonedDateTime zonedDateTime)
ZonedDateTime转Date
注意时间对应的时区和默认时区差异
|
static Date |
toDateEndOfMonth(YearMonth yearMonth)
YearMonth转Date,转换为当月最后一天
|
static Date |
toDateStartOfMonth(YearMonth yearMonth)
YearMonth转Date,转换为当月第一天
|
static long |
toEpochMilli(Date date)
Date转时间戳
从1970-01-01T00:00:00Z开始的毫秒值
|
static long |
toEpochMilli(Instant instant)
Instant转时间戳
从1970-01-01T00:00:00Z开始的毫秒值
|
static long |
toEpochMilli(LocalDate localDate)
LocalDate转时间戳
从1970-01-01T00:00:00Z开始的毫秒值
|
static long |
toEpochMilli(LocalDateTime localDateTime)
LocalDateTime转时间戳
从1970-01-01T00:00:00Z开始的毫秒值
|
static long |
toEpochMilli(LocalTime localTime)
LocalTime转时间戳
从1970-01-01T00:00:00Z开始的毫秒值
转换时会加上当天日期部分组成localDateTime再转换
|
static long |
toEpochMilli(TemporalAccessor temporal)
temporal转时间戳
|
static long |
toEpochMilli(Timestamp timestamp)
Timestamp转时间戳
从1970-01-01T00:00:00Z开始的毫秒值
|
static long |
toEpochMilli(ZonedDateTime zonedDateTime)
ZonedDateTime转时间戳,注意,zonedDateTime时区必须和当前系统时区一致,不然会出现问题
从1970-01-01T00:00:00Z开始的毫秒值
|
static Instant |
toInstant(Date date)
Date转Instant
|
static Instant |
toInstant(LocalDate localDate)
LocalDate转Instant
|
static Instant |
toInstant(LocalDateTime localDateTime)
LocalDateTime转Instant
|
static Instant |
toInstant(LocalTime localTime)
LocalTime转Instant
以当天的日期+LocalTime组成新的LocalDateTime转换为Instant
|
static Instant |
toInstant(long epochMilli)
时间戳epochMilli毫秒转Instant
|
static Instant |
toInstant(TemporalAccessor temporal)
temporal转Instant
|
static Instant |
toInstant(Timestamp timestamp)
Timestamp转Instant
|
static Instant |
toInstant(ZonedDateTime zonedDateTime)
ZonedDateTime转Instant
注意,zonedDateTime时区必须和当前系统时区一致,不然会出现问题
|
static LocalDate |
toLocalDate(Date date)
Date转LocalDate
|
static LocalDate |
toLocalDate(Instant instant)
Instant转LocalDate
|
static LocalDate |
toLocalDate(LocalDateTime localDateTime)
LocalDateTime转LocalDate
|
static LocalDate |
toLocalDate(long epochMilli)
时间戳epochMilli毫秒转LocalDate
|
static LocalDate |
toLocalDate(TemporalAccessor temporal)
temporal转LocalDate
|
static LocalDate |
toLocalDate(YearMonth yearMonth,
int dayOfMonth)
YearMonth转LocalDate
注意dayOfMonth范围:1到31之间,最大值根据月份确定特殊情况,如2月闰年29,非闰年28
如果要转换为当月最后一天,可以使用下面方法:toLocalDateEndOfMonth(YearMonth)
|
static LocalDate |
toLocalDate(ZonedDateTime zonedDateTime)
ZonedDateTime转LocalDate
注意时间对应的时区和默认时区差异
|
static LocalDate |
toLocalDateEndOfMonth(YearMonth yearMonth)
YearMonth转LocalDate,转换为当月最后一天
|
static LocalDate |
toLocalDateStartOfMonth(YearMonth yearMonth)
YearMonth转LocalDate,转换为当月第一天
|
static LocalDateTime |
toLocalDateTime(Date date)
Date转LocalDateTime
|
static LocalDateTime |
toLocalDateTime(Instant instant)
Instant转LocalDateTime
|
static LocalDateTime |
toLocalDateTime(LocalDate localDate)
LocalDate转LocalDateTime
|
static LocalDateTime |
toLocalDateTime(LocalTime localTime)
LocalTime转LocalDateTime
以当天的日期+LocalTime组成新的LocalDateTime
|
static LocalDateTime |
toLocalDateTime(long epochMilli)
时间戳epochMilli毫秒转LocalDateTime
|
static LocalDateTime |
toLocalDateTime(TemporalAccessor temporal)
temporal转LocalDateTime
|
static LocalDateTime |
toLocalDateTime(Timestamp timestamp)
Timestamp转LocalDateTime
|
static LocalDateTime |
toLocalDateTime(ZonedDateTime zonedDateTime)
ZonedDateTime转LocalDateTime
注意时间对应的时区和默认时区差异
|
static LocalTime |
toLocalTime(Date date)
Date转LocalTime
|
static LocalTime |
toLocalTime(Instant instant)
Instant转LocalTime
|
static LocalTime |
toLocalTime(int timeMilli)
时间部分的毫秒转LocalTime
|
static LocalTime |
toLocalTime(LocalDateTime localDateTime)
LocalDateTime转LocalTime
|
static LocalTime |
toLocalTime(long epochMilli)
时间戳的毫秒转LocalTime
|
static LocalTime |
toLocalTime(TemporalAccessor temporal)
temporal转LocalTime
|
static LocalTime |
toLocalTime(ZonedDateTime zonedDateTime)
ZonedDateTime转LocalTime
注意时间对应的时区和默认时区差异
|
static int |
toTimeMilli(LocalTime localTime)
localTime转时间部分的毫秒
|
static Timestamp |
toTimestamp(Date date)
Date转Timestamp
|
static Timestamp |
toTimestamp(Instant instant)
Instant转Timestamp
|
static Timestamp |
toTimestamp(LocalDateTime localDateTime)
LocalDateTime转Timestamp
|
static Timestamp |
toTimestamp(long epochMilli)
时间戳epochMilli转Timestamp
|
static Timestamp |
toTimestamp(TemporalAccessor temporal)
temporal转Timestamp
|
static Timestamp |
toTimestamp(ZonedDateTime zonedDateTime)
ZonedDateTime转Timestamp
|
static YearMonth |
toYearMonth(Date date)
Date转YearMonth
|
static YearMonth |
toYearMonth(Instant instant)
Instant转YearMonth
|
static YearMonth |
toYearMonth(LocalDate localDate)
LocalDate转YearMonth
|
static YearMonth |
toYearMonth(LocalDateTime localDateTime)
LocalDateTime转YearMonth
|
static YearMonth |
toYearMonth(TemporalAccessor temporal)
temporal转YearMonth
|
static YearMonth |
toYearMonth(ZonedDateTime zonedDateTime)
ZonedDateTime转YearMonth
|
static ZonedDateTime |
toZonedDateTime(Date date)
Date转ZonedDateTime,时区为系统默认时区
|
static ZonedDateTime |
toZonedDateTime(Date date,
String zoneId)
Date转ZonedDateTime,可以直接转换为对应的时区
|
static ZonedDateTime |
toZonedDateTime(Date date,
ZoneId zone)
Date转ZonedDateTime
|
static ZonedDateTime |
toZonedDateTime(Instant instant)
Instant转ZonedDateTime,时区为系统默认时区
|
static ZonedDateTime |
toZonedDateTime(LocalDate localDate)
LocalDate转ZonedDateTime,时区为系统默认时区
|
static ZonedDateTime |
toZonedDateTime(LocalDateTime localDateTime)
LocalDateTime转ZonedDateTime,时区为系统默认时区
|
static ZonedDateTime |
toZonedDateTime(LocalDateTime localDateTime,
String zoneId)
LocalDateTime转ZonedDateTime,时区为zoneId对应时区
注意,需要保证localDateTime和zoneId是对应的,不然会出现错误 比如,localDateTime是巴黎时区下的对象,zoneId也应该是巴黎时区id |
static ZonedDateTime |
toZonedDateTime(LocalTime localTime)
LocalTime转ZonedDateTime
以当天的日期+LocalTime组成新的ZonedDateTime,时区为系统默认时区
|
static ZonedDateTime |
toZonedDateTime(long epochMilli)
时间戳epochMilli毫秒转ZonedDateTime,时区为系统默认时区
|
static ZonedDateTime |
toZonedDateTime(TemporalAccessor temporal)
temporal转ZonedDateTime,时区为系统默认时区
|
static ZonedDateTime |
toZonedDateTimeAndTransformZone(LocalDateTime localDateTime,
String targetZoneId)
LocalDateTime转ZonedDateTime,当前时区的LocalDateTime转换为目标时区的ZonedDateTime
注意,需要保证localDateTime当前时区下的对象 |
static long |
unitConversion(long sourceDuration,
TimeUnit sourceUnit,
TimeUnit targetUnit)
单位转换
|
static BigDecimal |
unitConversionPrecise(long sourceDuration,
TimeUnit sourceUnit,
TimeUnit targetUnit)
单位转换,精确计算,保留1位小数,ROUND_DOWN 舍去多余小数
|
static BigDecimal |
unitConversionPrecise(long sourceDuration,
TimeUnit sourceUnit,
TimeUnit targetUnit,
int scale,
RoundingMode roundingMode)
单位转换,精确计算
|
static String |
unitConversionPreciseString(long sourceDuration,
TimeUnit sourceUnit,
TimeUnit targetUnit,
int scale,
RoundingMode roundingMode)
单位转换,精确计算,返回字符串,去掉尾部多余0
|
public static Date toDate(LocalDateTime localDateTime)
localDateTime
- LocalDateTimepublic static Date toDate(LocalDate localDate)
localDate
- LocalDatepublic static Date toDate(LocalTime localTime)
localTime
- LocalTimepublic static Date toDate(Instant instant)
instant
- Instantpublic static Date toDate(long epochMilli)
epochMilli
- 时间戳public static Date toDate(ZonedDateTime zonedDateTime)
zonedDateTime
- ZonedDateTimepublic static Date toDate(TemporalAccessor temporal)
temporal
- TemporalAccessorpublic static Date toDate(YearMonth yearMonth, int dayOfMonth)
yearMonth
- YearMonthdayOfMonth
- 天public static Date toDateStartOfMonth(YearMonth yearMonth)
yearMonth
- YearMonthpublic static Date toDateEndOfMonth(YearMonth yearMonth)
yearMonth
- YearMonthpublic static LocalDateTime toLocalDateTime(Date date)
date
- Datepublic static LocalDateTime toLocalDateTime(Timestamp timestamp)
timestamp
- Timestamppublic static LocalDateTime toLocalDateTime(LocalDate localDate)
localDate
- LocalDatepublic static LocalDateTime toLocalDateTime(LocalTime localTime)
localTime
- LocalTimepublic static LocalDateTime toLocalDateTime(Instant instant)
instant
- Instantpublic static LocalDateTime toLocalDateTime(long epochMilli)
epochMilli
- 时间戳public static LocalDateTime toLocalDateTime(TemporalAccessor temporal)
temporal
- TemporalAccessorpublic static LocalDateTime toLocalDateTime(ZonedDateTime zonedDateTime)
zonedDateTime
- ZonedDateTimepublic static LocalDate toLocalDate(Date date)
date
- Datepublic static LocalDate toLocalDate(LocalDateTime localDateTime)
localDateTime
- LocalDateTimepublic static LocalDate toLocalDate(Instant instant)
instant
- Instantpublic static LocalDate toLocalDate(long epochMilli)
epochMilli
- 时间戳public static LocalDate toLocalDate(TemporalAccessor temporal)
temporal
- TemporalAccessorpublic static LocalDate toLocalDate(ZonedDateTime zonedDateTime)
zonedDateTime
- ZonedDateTimepublic static LocalDate toLocalDate(YearMonth yearMonth, int dayOfMonth)
yearMonth
- YearMonthdayOfMonth
- 天public static LocalDate toLocalDateStartOfMonth(YearMonth yearMonth)
yearMonth
- YearMonthpublic static LocalDate toLocalDateEndOfMonth(YearMonth yearMonth)
yearMonth
- YearMonthpublic static LocalTime toLocalTime(Date date)
date
- Datepublic static LocalTime toLocalTime(LocalDateTime localDateTime)
localDateTime
- LocalDateTimepublic static LocalTime toLocalTime(Instant instant)
instant
- Instantpublic static LocalTime toLocalTime(TemporalAccessor temporal)
temporal
- TemporalAccessorpublic static LocalTime toLocalTime(ZonedDateTime zonedDateTime)
zonedDateTime
- ZonedDateTimepublic static LocalTime toLocalTime(long epochMilli)
epochMilli
- 时间戳的毫秒public static LocalTime toLocalTime(int timeMilli)
timeMilli
- 时间部分的毫秒public static int toTimeMilli(LocalTime localTime)
localTime
- localTimepublic static Instant toInstant(Date date)
date
- Datepublic static Instant toInstant(Timestamp timestamp)
timestamp
- Timestamppublic static Instant toInstant(LocalDateTime localDateTime)
localDateTime
- LocalDateTimepublic static Instant toInstant(LocalDate localDate)
localDate
- LocalDatepublic static Instant toInstant(LocalTime localTime)
localTime
- LocalTimepublic static Instant toInstant(long epochMilli)
epochMilli
- 时间戳public static Instant toInstant(TemporalAccessor temporal)
temporal
- TemporalAccessorpublic static Instant toInstant(ZonedDateTime zonedDateTime)
zonedDateTime
- ZonedDateTimepublic static long toEpochMilli(Date date)
date
- Datepublic static long toEpochMilli(Timestamp timestamp)
timestamp
- Timestamppublic static long toEpochMilli(LocalDateTime localDateTime)
localDateTime
- LocalDateTimepublic static long toEpochMilli(LocalDate localDate)
localDate
- LocalDatepublic static long toEpochMilli(LocalTime localTime)
localTime
- localTimepublic static long toEpochMilli(Instant instant)
instant
- Instantpublic static long toEpochMilli(ZonedDateTime zonedDateTime)
zonedDateTime
- ZonedDateTimepublic static long toEpochMilli(TemporalAccessor temporal)
temporal
- TemporalAccessorpublic static ZonedDateTime toZonedDateTime(Date date)
date
- Datepublic static ZonedDateTime toZonedDateTime(Date date, String zoneId)
date
- Date 没有时区区分zoneId
- 目标时区public static ZonedDateTime toZonedDateTime(Date date, ZoneId zone)
date
- Datezone
- 目标时区public static ZonedDateTime toZonedDateTime(LocalDateTime localDateTime)
localDateTime
- LocalDateTimepublic static ZonedDateTime toZonedDateTime(LocalDateTime localDateTime, String zoneId)
localDateTime
- LocalDateTimezoneId
- 时区idpublic static ZonedDateTime toZonedDateTimeAndTransformZone(LocalDateTime localDateTime, String targetZoneId)
localDateTime
- LocalDateTime 系统默认时区的localDateTime对象targetZoneId
- 目标时区idpublic static ZonedDateTime toZonedDateTime(LocalDate localDate)
localDate
- LocalDatepublic static ZonedDateTime toZonedDateTime(LocalTime localTime)
localTime
- LocalTimepublic static ZonedDateTime toZonedDateTime(Instant instant)
instant
- Instantpublic static ZonedDateTime toZonedDateTime(long epochMilli)
epochMilli
- 时间戳public static ZonedDateTime toZonedDateTime(TemporalAccessor temporal)
temporal
- TemporalAccessorpublic static YearMonth toYearMonth(Date date)
date
- Datepublic static YearMonth toYearMonth(LocalDateTime localDateTime)
localDateTime
- LocalDateTimepublic static YearMonth toYearMonth(LocalDate localDate)
localDate
- LocalDatepublic static YearMonth toYearMonth(Instant instant)
instant
- Instantpublic static YearMonth toYearMonth(ZonedDateTime zonedDateTime)
zonedDateTime
- ZonedDateTimepublic static YearMonth toYearMonth(TemporalAccessor temporal)
temporal
- TemporalAccessorpublic static Timestamp toTimestamp(Date date)
date
- Datepublic static Timestamp toTimestamp(LocalDateTime localDateTime)
localDateTime
- LocalDateTimepublic static Timestamp toTimestamp(Instant instant)
instant
- Instantpublic static Timestamp toTimestamp(long epochMilli)
epochMilli
- 时间戳public static Timestamp toTimestamp(ZonedDateTime zonedDateTime)
zonedDateTime
- ZonedDateTimepublic static Timestamp toTimestamp(TemporalAccessor temporal)
temporal
- TemporalAccessorpublic static long unitConversion(long sourceDuration, TimeUnit sourceUnit, TimeUnit targetUnit)
sourceDuration
- 数量sourceUnit
- 原单位targetUnit
- 新单位public static BigDecimal unitConversionPrecise(long sourceDuration, TimeUnit sourceUnit, TimeUnit targetUnit, int scale, RoundingMode roundingMode)
sourceDuration
- 数量sourceUnit
- 原单位targetUnit
- 新单位scale
- 小数位数roundingMode
- 舍入模式public static String unitConversionPreciseString(long sourceDuration, TimeUnit sourceUnit, TimeUnit targetUnit, int scale, RoundingMode roundingMode)
sourceDuration
- 数量sourceUnit
- 原单位targetUnit
- 新单位scale
- 小数位数roundingMode
- 舍入模式public static BigDecimal unitConversionPrecise(long sourceDuration, TimeUnit sourceUnit, TimeUnit targetUnit)
sourceDuration
- 数量sourceUnit
- 原单位targetUnit
- 新单位public static long dayToHour(long num)
num
- 待转换值public static long dayToMinute(long num)
num
- 待转换值public static long dayToSecond(long num)
num
- 待转换值public static long dayToMillisecond(long num)
num
- 待转换值public static long hourToMinute(long num)
num
- 待转换值public static long hourToSecond(long num)
num
- 待转换值public static long hourToMillisecond(long num)
num
- 待转换值public static long hourToDay(long num)
num
- 待转换值public static BigDecimal hourToDayPrecise(long num)
num
- 待转换值public static String hourToDayPreciseString(long num)
num
- 待转换值public static long minuteToSecond(long num)
num
- 待转换值public static long minuteToMillisecond(long num)
num
- 待转换值public static long minuteToHour(long num)
num
- 待转换值public static BigDecimal minuteToHourPrecise(long num)
num
- 待转换值public static String minuteToHourPreciseString(long num)
num
- 待转换值public static long minuteToDay(long num)
num
- 待转换值public static BigDecimal minuteToDayPrecise(long num)
num
- 待转换值public static String minuteToDayPreciseString(long num)
num
- 待转换值public static long secondToMillisecond(long num)
num
- 待转换值public static long secondToMinute(long num)
num
- 待转换值public static BigDecimal secondToMinutePrecise(long num)
num
- 待转换值public static String secondToMinutePreciseString(long num)
num
- 待转换值public static long secondToHour(long num)
num
- 待转换值public static BigDecimal secondToHourPrecise(long num)
num
- 待转换值public static String secondToHourPreciseString(long num)
num
- 待转换值public static long secondToDay(long num)
num
- 待转换值public static BigDecimal secondToDayPrecise(long num)
num
- 待转换值public static String secondToDayPreciseString(long num)
num
- 待转换值public static long millisecondToSecond(long num)
num
- 待转换值public static BigDecimal millisecondToSecondPrecise(long num)
num
- 待转换值public static String millisecondToSecondPreciseString(long num)
num
- 待转换值public static BigDecimal millisecondToSecondPreciseThree(long num)
num
- 待转换值public static String millisecondToSecondPreciseThreeString(long num)
num
- 待转换值public static String millisecondToSecondPreciseThreePlainString(long num)
num
- 待转换值public static long millisecondToMinute(long num)
num
- 待转换值public static BigDecimal millisecondToMinutePrecise(long num)
num
- 待转换值public static String millisecondToMinutePreciseString(long num)
num
- 待转换值public static long millisecondToHour(long num)
num
- 待转换值public static BigDecimal millisecondToHourPrecise(long num)
num
- 待转换值public static String millisecondToHourPreciseString(long num)
num
- 待转换值public static long millisecondToDay(long num)
num
- 待转换值public static BigDecimal millisecondToDayPrecise(long num)
num
- 待转换值public static String millisecondToDayPreciseString(long num)
num
- 待转换值Copyright © 2021. All rights reserved.