Class DateUtil
java.lang.Object
io.github.seenings.time.util.DateUtil
日期工具类.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbasicIsoDateOffsetDays(String basicIsoDate, int offset) ISO-8601(yyyyMMdd)字符串格式日期做日偏移static LocalDatebasicIsoDateToLocalDate(String basicIsoDate) ISO-8601(yyyyMMdd)字符串格式日期转1.8格式日期static booleanbetween(int value, int min, int max) 数字在两个数字之间static StringconstellationEnumToConstellation(ConstellationEnum constellationEnum) static StringlocalDateTimeToBasicIsoDate(LocalDateTime localDateTime) 1.8格式日期时间转换为ISO-8601(yyyyMMdd)字符串格式日期static DatelocalDateTimeToDate(LocalDateTime localDateTime) LocalDateTime-to-Datestatic StringlocalDateTimeToPatternFormatDate(LocalDateTime localDateTime, String pattern) 1.8格式日期时间转换为字符串static StringlocalDateToBasicIsoDate(LocalDate localDate) 日期转换为ISO-8601(yyyyMMdd)字符串格式日期static StringmonthAndDayToConstellation(Integer month, Integer day) static ConstellationEnummonthAndDayToConstellationEnum(Integer month, Integer day)
-
Field Details
-
SEVENTEEN_FORMAT
-
-
Method Details
-
monthAndDayToConstellationEnum
-
between
public static boolean between(int value, int min, int max) 数字在两个数字之间- Parameters:
value- 数字min- 小的max- 大的- Returns:
- 是否
-
monthAndDayToConstellation
-
constellationEnumToConstellation
-
basicIsoDateToLocalDate
-
localDateToBasicIsoDate
-
localDateTimeToPatternFormatDate
1.8格式日期时间转换为字符串- Parameters:
localDateTime- 1.8格式日期时间pattern- 日期格式字符串- Returns:
- 字符串
-
localDateTimeToDate
LocalDateTime-to-Date- Parameters:
localDateTime- 1.8格式日期时间- Returns:
- 1.0格式日期时间
-
localDateTimeToBasicIsoDate
1.8格式日期时间转换为ISO-8601(yyyyMMdd)字符串格式日期- Parameters:
localDateTime- 1.8格式日期时间- Returns:
- ISO-8601(yyyyMMdd)字符串格式日期
-
basicIsoDateOffsetDays
-