Class DateUtils
java.lang.Object
software.amazon.awssdk.utils.DateUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatIso8601Date(Instant date) Formats the specified date as an ISO 8601 string.static StringformatRfc1123Date(Instant instant) Formats the specified date as an RFC 1123 string.static StringformatRfc822Date(Instant instant) Formats the specified date as an RFC 822 string.static StringformatUnixTimestampInstant(Instant instant) Formats the giveInstantobject into an Unix timestamp with millisecond decimal precision.static longnumberOfDaysSinceEpoch(long milliSinceEpoch) Returns the number of days since epoch with respect to the given number of milliseconds since epoch.static InstantparseIso8601Date(String dateString) Parses the specified date string as an ISO 8601 date (yyyy-MM-dd'T'HH:mm:ss.SSSZZ) and returns theInstantobject.static InstantparseRfc1123Date(String dateString) Parses the specified date string as an RFC 1123 date and returns the Date object.static InstantparseRfc822Date(String dateString) Parses the specified date string as an RFC 822 date and returns the Date object.static InstantparseUnixTimestampInstant(String dateString) Parses the given string containing a Unix timestamp with millisecond decimal precision into anInstantobject.static InstantparseUnixTimestampMillisInstant(String dateString) Parses the given string containing a Unix timestamp in epoch millis into aInstantobject.
-
Method Details
-
parseIso8601Date
-
formatIso8601Date
-
parseRfc822Date
-
formatRfc822Date
-
parseRfc1123Date
-
formatRfc1123Date
-
numberOfDaysSinceEpoch
public static long numberOfDaysSinceEpoch(long milliSinceEpoch) Returns the number of days since epoch with respect to the given number of milliseconds since epoch. -
parseUnixTimestampInstant
Parses the given string containing a Unix timestamp with millisecond decimal precision into anInstantobject.- Throws:
NumberFormatException
-
parseUnixTimestampMillisInstant
public static Instant parseUnixTimestampMillisInstant(String dateString) throws NumberFormatException Parses the given string containing a Unix timestamp in epoch millis into aInstantobject.- Throws:
NumberFormatException
-
formatUnixTimestampInstant
-