Skip to content

Instantly share code, notes, and snippets.

@sifue
Created February 14, 2012 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sifue/1826754 to your computer and use it in GitHub Desktop.
Save sifue/1826754 to your computer and use it in GitHub Desktop.
日本語ロケールの際のJavaのDateFormatの使い方 ref: http://qiita.com/items/2487
// yyyy/MM/dd
DateFormat format = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.getDefault());
// yyyy/MM/dd hh:mm:ss
DateFormat format = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.getDefault());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment