Here you can find the source of formatIso8601Date(Instant date)
Parameter | Description |
---|---|
date | the date to format |
public static String formatIso8601Date(Instant date)
//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); } }