4
DateTimeFormatter fmt = DateTimeFormat.forStyle('SS')。withLocale(locale) DateTime dt = fmt.parseDateTime(「11/4/03 8:14 PM」);Joda time:DateTimeFormatter:一天的開始
上述語句將正確解析字符串,並保存爲DateTime(Joda Time)。
現在該如何表示一天的開始。下面的失敗與 DateTime dt = fmt.parseDateTime(「11/4/03 00:01 AM」);
無法解析「03年11月4日上午12時01分」:值0 clockhourOfHalfday必須在範圍[1,12]
我的標準顯然困惑,像什麼short representation一天的開始。
謝謝。
感謝提示..我在http://en.wikipedia.org/wiki/12-hour_clock看到它,它的確是12:00 am .. – bsr 2010-06-14 03:27:56