Code example for GregorianCalendar

Methods: get

0
	// @purpose : Calender -> String(YYYY-MM-DD HH:MI:SS) 
	public String comConv_CalenderToString( GregorianCalendar c )
	{ 
		String sRet="";
		 
		sRet = String.valueOf(c.get(Calendar.YEAR));
		sRet = sRet + "-" +String.valueOf(c.get(Calendar.MONTH)+1);
		sRet = sRet + "-" +String.valueOf(c.get(Calendar.DAY_OF_MONTH));
 
		sRet = sRet + " " +String.valueOf(c.get(Calendar.HOUR_OF_DAY));
		sRet = sRet + ":" +String.valueOf(c.get(Calendar.MINUTE));
		sRet = sRet + ":" +String.valueOf(c.get(Calendar.SECOND));
 
		return sRet;
	} 
 
	// 
	// @purpose : Calender -> String(YYYY-MM-DD) 
	public String comConv_DateToString( GregorianCalendar c )
	{ 
		String sRet="";