Java Calendar to String toString(Calendar c)

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

Description

to String

License

Apache License

Declaration

public static String toString(Calendar c) 

Method Source Code


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

import java.text.DateFormat;

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

public class Main {
    public static String toString(Calendar c) {
        return getDateFormat().format(c.getTime());
    }/*  w  w w.ja va 2  s  .c o  m*/

    private static DateFormat getDateFormat() {
        DateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
        return formatter;
    }
}

Related

  1. getDateString(Calendar cal)
  2. getDateString(Calendar cal)
  3. getDateString(Calendar calendar)
  4. getDateToString(Calendar argCal)
  5. getString(Calendar calendar)
  6. toString(Calendar cal)
  7. toString(Calendar cal)
  8. toString(Calendar cal)
  9. toString(Calendar calendar)