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.
如何将以下日期缩短为 9 月 19 日星期四之类的日期
java.util.Date t = MoonPhaseFinder.findFullMoonFollowing(Calendar.getInstance());
上面的代码打印如下
Thu Sep 19 21:34:21 EST 2013
试试这个:
SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd'th' MMMM"); System.out.println(sdf.format(t));