本文整理匯總了Java中org.odata4j.internal.InternalUtil.parseDateTimeFromXml方法的典型用法代碼示例。如果您正苦於以下問題:Java InternalUtil.parseDateTimeFromXml方法的具體用法?Java InternalUtil.parseDateTimeFromXml怎麽用?Java InternalUtil.parseDateTimeFromXml使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.odata4j.internal.InternalUtil
的用法示例。
在下文中一共展示了InternalUtil.parseDateTimeFromXml方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testyyyyMMddHHmm
import org.odata4j.internal.InternalUtil; //導入方法依賴的package包/類
@Test
public void testyyyyMMddHHmm() {
LocalDateTime ldt = InternalUtil.parseDateTimeFromXml("2010-12-20T17:34");
Assert.assertEquals(2010, ldt.getYear());
Assert.assertEquals(12, ldt.getMonthOfYear());
Assert.assertEquals(20, ldt.getDayOfMonth());
Assert.assertEquals(17, ldt.getHourOfDay());
Assert.assertEquals(34, ldt.getMinuteOfHour());
Assert.assertEquals(0, ldt.getSecondOfMinute());
Assert.assertEquals(0, ldt.getMillisOfSecond());
}
示例2: testyyyyMMddHHmmss
import org.odata4j.internal.InternalUtil; //導入方法依賴的package包/類
@Test
public void testyyyyMMddHHmmss() {
LocalDateTime ldt = InternalUtil.parseDateTimeFromXml("2010-12-20T17:34:05");
Assert.assertEquals(2010, ldt.getYear());
Assert.assertEquals(12, ldt.getMonthOfYear());
Assert.assertEquals(20, ldt.getDayOfMonth());
Assert.assertEquals(17, ldt.getHourOfDay());
Assert.assertEquals(34, ldt.getMinuteOfHour());
Assert.assertEquals(5, ldt.getSecondOfMinute());
Assert.assertEquals(0, ldt.getMillisOfSecond());
}
示例3: testyyyyMMddHHmmssfffffff
import org.odata4j.internal.InternalUtil; //導入方法依賴的package包/類
@Test
public void testyyyyMMddHHmmssfffffff() {
LocalDateTime ldt = InternalUtil.parseDateTimeFromXml("2010-12-20T17:34:05.1234567");
Assert.assertEquals(2010, ldt.getYear());
Assert.assertEquals(12, ldt.getMonthOfYear());
Assert.assertEquals(20, ldt.getDayOfMonth());
Assert.assertEquals(17, ldt.getHourOfDay());
Assert.assertEquals(34, ldt.getMinuteOfHour());
Assert.assertEquals(5, ldt.getSecondOfMinute());
Assert.assertEquals(123, ldt.getMillisOfSecond());
}
示例4: testyyyyMMddHHmmssffffffIgnoreZ
import org.odata4j.internal.InternalUtil; //導入方法依賴的package包/類
@Test
public void testyyyyMMddHHmmssffffffIgnoreZ() {
LocalDateTime ldt = InternalUtil.parseDateTimeFromXml("2012-02-09T20:21:10.283459Z");
Assert.assertEquals(2012, ldt.getYear());
Assert.assertEquals(2, ldt.getMonthOfYear());
Assert.assertEquals(9, ldt.getDayOfMonth());
Assert.assertEquals(20, ldt.getHourOfDay());
Assert.assertEquals(21, ldt.getMinuteOfHour());
Assert.assertEquals(10, ldt.getSecondOfMinute());
Assert.assertEquals(283, ldt.getMillisOfSecond());
}
示例5: testyyyyMMddHHmmsspm0600
import org.odata4j.internal.InternalUtil; //導入方法依賴的package包/類
@Test(expected = IllegalArgumentException.class)
public void testyyyyMMddHHmmsspm0600() {
InternalUtil.parseDateTimeFromXml("2010-12-20T17:34:05.-06:00");
}