public class Format {
public static void main(String[] args) {
Date date = new Date();
String s1 = String.format("%tb", date);
String s2 = String.format("%tB", date);
結果出來是中文十月 怎么才能輸出 英文的月份呢
uj5u.com熱心網友回復:
format指定locale引數試試String.format(Locale.US, “%tb”, date);
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/179140.html
標籤:Eclipse
