avatar JK Park
Dec 11, 2014
날짜 표현 DateFormat, Custom Date Text View
Contents
Date today;
String output;
SimpleDateFormat formatter;

formatter = new SimpleDateFormat(pattern, currentLocale);
today = new Date();
output = formatter.format(today);
System.out.println(pattern + " " + output);

Customized Date and Time Formats

PatternOutput
dd.MM.yy30.06.09
yyyy.MM.dd G ‘at’ hh:mm:ss z2009.06.30 AD at 08:29:36 PDT
EEE, MMM d, ‘‘yyTue, Jun 30, ‘09
h:mm a8:29 PM
H:mm8:29
H:mm:ss:SSS8:28:36:249
K:mm a,z8:29 AM,PDT
yyyy.MMMMM.dd GGG hh:mm aaa2009.June.30 AD 08:29 AM

Custom Date Text View