Java Date Format ISO formatDateAsIsoDate(Calendar calendar)

Here you can find the source of formatDateAsIsoDate(Calendar calendar)

Description

format Date As Iso Date

License

Apache License

Declaration

public static String formatDateAsIsoDate(Calendar calendar) 

Method Source Code

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

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Main {
    private static SimpleDateFormat isoDateFormatter = new SimpleDateFormat("yyyyMMdd");

    public static String formatDateAsIsoDate(Date date) {
        return isoDateFormatter.format(date);
    }/*from   ww w  .j ava2s .c o  m*/

    public static String formatDateAsIsoDate(Calendar calendar) {
        return formatDateAsIsoDate(calendar.getTime());
    }
}

Related

  1. createISODateTimeFormatter()
  2. format(BigDecimal num, int divisor)
  3. formatAlternativeIso8601Date(Date date)
  4. formatAsIso8601Timestamp(Date date)
  5. formatAwsFlavouredISO8601Date(Date date)
  6. formatDateAsIsoString(Date date)
  7. formatDateISO(Date date)
  8. formatDateISO(Date date)
  9. formatISO(Integer integerValue)