Java Calendar to String calendarToIso(Calendar c)

Here you can find the source of calendarToIso(Calendar c)

Description

calendar To Iso

License

LGPL

Declaration

public static String calendarToIso(Calendar c) 

Method Source Code


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

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

import java.util.Locale;

public class Main {
    private static final DateFormat ISO_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd", Locale.GERMAN);

    public static String calendarToIso(Calendar c) {
        return ISO_DATE_FORMAT.format(c.getTime());
    }/*from w  w w  . j  ava  2  s.  c  om*/
}

Related

  1. calendar2string(Calendar calendar, String formatString)
  2. calendarDateToStrFormatddMMMyy(final Calendar cal)
  3. calendarOutput(Calendar date)
  4. calendarParaString(Calendar cal)
  5. calendarToSiteDataString(final Calendar cal)
  6. calendarToStorageRoomTimeString(Calendar cal)
  7. calendarToString(Calendar c)
  8. calendarToString(Calendar c, String format)