Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用下面的代码从时间戳获取日期:
java.util.Date d = new java.util.Date(Long.parseLong(created_at) * 1000);
我目前正在获取英文日期,但我想要繁体中文。有可能这样做吗?
使用日期区域设置。
java.util.Date today = new java.util.Date(); SimpleDateFormat.getDateInstance(SimpleDateFormat.LONG,Locale.CHINA).format(today).toUpperCase());