Here you can find the source of getDateString(Calendar cal)
Parameter | Description |
---|---|
cal | Description of the Parameter |
public static String getDateString(Calendar cal)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { /**/*from w ww. j ava 2s . co m*/ * Returns the current date of the calendar in the m/d/yyyy format as a * string * * @param cal Description of the Parameter * @return The dateString value */ public static String getDateString(Calendar cal) { return (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.DAY_OF_MONTH) + "/" + cal.get(Calendar.YEAR); } }