JodaTime中* 内置了许多标准的 日期 和 时间 格式。 *
这是我使用的一个示例:
DateTime dateTime = DateTime.now(DateTimeZone.UTC);String formattedDateTime = dateTime.toString(DateTimeFormat.fullDateTime());
请注意
DateTimeFormat.fullDateTime()。
其他一些选项包括:
完整列表可以在以下位置找到:http://www.joda.org/joda-
time/apidocs/org/joda/time/format/DateTimeFormat.html#forStyle(java.lang.String)
干杯,
J.P
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)