Java Utililty Methods Date Format ISO

List of utility methods to do Date Format ISO

Description

The list of methods to do Date Format ISO are organized into topic(s).

Method

DateFormatcreateISODateTimeFormatter()
create ISO Date Time Formatter
DateFormat dtf = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);
dtf.setTimeZone(TimeZone.getTimeZone("UTC"));
return dtf;
Stringformat(BigDecimal num, int divisor)
format
return format(num.divide(new BigDecimal(divisor)));
StringformatAlternativeIso8601Date(Date date)
format Alternative Iso Date
return getAlternativeIso8601DateFormat().format(date);
StringformatAsIso8601Timestamp(Date date)
format As Iso Timestamp
TimeZone ts = TimeZone.getTimeZone("UTC");
DateFormat isoFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
isoFormat.setTimeZone(ts);
return isoFormat.format(date);
StringformatAwsFlavouredISO8601Date(Date date)
format Aws Flavoured ISO Date
synchronized (awsFlavouredISO8601DateParser) {
    return awsFlavouredISO8601DateParser.format(date);
StringformatDateAsIsoDate(Calendar calendar)
format Date As Iso Date
return formatDateAsIsoDate(calendar.getTime());
StringformatDateAsIsoString(Date date)
Formats this date in the standard ISO format.
if (date == null) {
    return "";
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
StringformatDateISO(Date date)
format Date ISO
if (date == null) {
    return null;
synchronized (sdf) {
    sdf.applyPattern(ISO_FORMAT_SECONDS);
    sdf.setTimeZone(GMT);
    return sdf.format(date);
StringformatDateISO(Date date)
format Date ISO
if (date == null) {
    return null;
isoFormat.applyPattern(ISO_FORMAT_SECONDS);
return isoFormat.format(date);
StringformatISO(Integer integerValue)
Formats a double value according to the ISO format for double
if (integerValue != null) {
    return isoIntegerFormat.format(integerValue);
} else {
    return "";