Skip to content

Instantly share code, notes, and snippets.

@potato2003
Created May 22, 2014 08:44
Show Gist options
  • Save potato2003/3e72cc05d718a305ba1a to your computer and use it in GitHub Desktop.
Save potato2003/3e72cc05d718a305ba1a to your computer and use it in GitHub Desktop.
Show day of the week for different locale.
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class Main {
public static void main(String[] args) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日 E曜日", Locale.JAPAN);
Date now = new Date();
System.out.println(formatter.format(now));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment