public String toString() Formats a date in the date escape format yyyy-mm-dd. NOTE: To specify a date format for the class SimpleDateFormat, use "yyyy.MM.dd" rather than "yyyy-mm-dd". In the context of SimpleDateFormat, "mm" indicates minutes rather than the month. For example: Format Pattern Result -------------- ------- "yyyy.MM.dd G 'at' hh:mm:ss z" ->> 1996.07.10 AD at 15:08:56 PDT Overrides: toString in class Date Returns: a String in yyyy-mm-dd format See Also: Date.toLocaleString(), Date.toGMTString() 这是API doc的说明。自己好好看看吧
-------------- -------
"yyyy.MM.dd G 'at' hh:mm:ss z" ->> 1996.07.10 AD at 15:08:56 PDT
Overrides:
toString in class Date Returns:
a String in yyyy-mm-dd format
See Also:
Date.toLocaleString(), Date.toGMTString()
这是API doc的说明。自己好好看看吧