Java Instant Format formatIso8601Date(Instant date)

Here you can find the source of formatIso8601Date(Instant date)

Description

Formats the specified date as an ISO 8601 string.

License

Apache License

Parameter

Parameter Description
date the date to format

Return

the ISO-8601 string representing the specified date

Declaration

public static String formatIso8601Date(Instant date) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.time.Instant;

import static java.time.format.DateTimeFormatter.ISO_INSTANT;

public class Main {
    /**/*from w ww .  j a v a2  s .  c  om*/
     * Formats the specified date as an ISO 8601 string.
     *
     * @param date the date to format
     * @return the ISO-8601 string representing the specified date
     */
    public static String formatIso8601Date(Instant date) {
        return ISO_INSTANT.format(date);
    }
}

Related

  1. formatAtSAST(Instant instant, DateTimeFormatter format)
  2. formatDate(Instant date, Locale locale)
  3. formatDateForInstant(Instant instant)
  4. formatHttpDate(Instant instant)
  5. formatInstant(TemporalAccessor instant)
  6. formatTimeLocal(Instant instant)
  7. parseInstant(String dateString, DateTimeFormatter formatter)
  8. toInfluxDBTimeFormat(final Instant time)