Package com.bytedesk.core.utils
Class BdDateUtils
java.lang.Object
com.bytedesk.core.utils.BdDateUtils
时间常用函数
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Date
dateAddOneDay
(Date date) static String
dateStringAddOneDayToString
(String dateString) static String
static String
static String
static String
formatDatetimeToString
(LocalDateTime localDateTime) 将 LocalDateTime 转换为格式化的日期时间字符串static String
formatDatetimeToString
(Date date) static String
static String
formatDateToString
(Date date) static Date
formatStringToDate
(String date) static Date
formatStringToDateTime
(String date) static Date
formatStringToTime
(String time) static String
formatTimeToString
(Date date) static String
static String
static ZonedDateTime
static ZoneId
static DateTimeFormatter
static DateTimeFormatter
static int
static LocalDateTime
parseLocalDateTime
(String time) static LocalDateTime
parseLocalDateTime
(String time, DateTimeFormatter formatter) static String
transformDateForVoa
(String enDate) static String
transformEnDateToCnDate
(String enDate)
-
Field Details
-
datetimeFormat
- See Also:
-
datetimeUidFormat
- See Also:
-
dateFormat
- See Also:
-
dateFormatSlash
- See Also:
-
dateFormatSlashNoZero
- See Also:
-
timeFormat
- See Also:
-
-
Constructor Details
-
BdDateUtils
private BdDateUtils()
-
-
Method Details
-
formatDatetimeNow
-
formatDatetimeToString
-
formatDatetimeToString
将 LocalDateTime 转换为格式化的日期时间字符串- Parameters:
localDateTime
- LocalDateTime对象- Returns:
- 格式化的日期时间字符串 (yyyy-MM-dd HH:mm:ss)
-
formatStringToDateTime
-
formatDatetimeUid
-
formatToday
-
formatStringToTime
-
formatTimeToString
-
formatDateSlashNow
-
formatDateSlashNowNoZero
-
formatDateToString
-
formatStringToDate
-
transformEnDateToCnDate
-
dateStringAddOneDayToString
-
dateAddOneDay
-
transformDateForVoa
-
getHourOfDay
public static int getHourOfDay() -
getDateTimeFormatter
-
getDateFormatter
-
parseLocalDateTime
-
parseLocalDateTime
-
getCurrentLocalDateTime
-
getCurrentZonedDateTime
-
getCurrentZoneId
-