Here you can find the source of formatDate(Date date)
Parameter | Description |
---|---|
date | a date to format |
public static String formatDate(Date date)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static String XML_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'"; /**/*from www. j a v a 2 s .com*/ * Formats a date for sending to the Ribbit Rest Server * @param date a date to format * @return true if parameter valid, otherwise false */ public static String formatDate(Date date) { SimpleDateFormat formatter = new SimpleDateFormat(XML_DATE_FORMAT); return formatter.format(date); } }