Java Calendar Format formatCalendar(Calendar objCal, String strFormat)

Here you can find the source of formatCalendar(Calendar objCal, String strFormat)

Description

format Calendar

License

Apache License

Declaration

public static String formatCalendar(Calendar objCal, String strFormat) 

Method Source Code

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

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

public class Main {
    public static String formatCalendar(Calendar objCal, String strFormat) {

        if (objCal == null) {
            return null;
        } else {/*from w  w  w .ja  v  a 2 s . co m*/
            SimpleDateFormat formatter = new SimpleDateFormat(strFormat);
            return formatter.format(objCal.getTime());
        }
    }
}

Related

  1. formatarData(Calendar data)
  2. formatCalendar(Calendar calendar)
  3. formatCalendar(Calendar calendar)
  4. formatCalendar(Calendar calendar)
  5. formatCalendar(Calendar calendar)
  6. formatCalendarTS(Calendar value)
  7. formatCalendarXsdZulu(Calendar c, int millisDigits)
  8. formatDate(Calendar c)
  9. formatDate(Calendar c)