Java Date Format ISO isoDateFormat(Calendar calendar)

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

Description

iso Date Format

License

Apache License

Declaration

public static String isoDateFormat(Calendar calendar) 

Method Source Code

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

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;

public class Main {
    public static String isoDateFormat(Calendar calendar) {
        TimeZone tz = TimeZone.getTimeZone("UTC");
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'");
        df.setTimeZone(tz);//from   ww  w .java 2 s.  c o m
        return df.format(calendar.getTime());
    }
}

Related

  1. getSDFISO8601()
  2. getShortISODateTime(final Date inDate)
  3. iso(Date date)
  4. iso8601(final Date date)
  5. iso8601Date(Date d)
  6. isoDateFormat(final Date date)
  7. isoDateTimeUTC(final Date val)
  8. isoFormat(Date date)
  9. isoTime(Date d)