本文整理匯總了Java中org.joda.time.PeriodType.yearWeekDayTime方法的典型用法代碼示例。如果您正苦於以下問題:Java PeriodType.yearWeekDayTime方法的具體用法?Java PeriodType.yearWeekDayTime怎麽用?Java PeriodType.yearWeekDayTime使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.joda.time.PeriodType
的用法示例。
在下文中一共展示了PeriodType.yearWeekDayTime方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testSetIntoPeriod_Object2
import org.joda.time.PeriodType; //導入方法依賴的package包/類
public void testSetIntoPeriod_Object2() throws Exception {
MutablePeriod m = new MutablePeriod(PeriodType.yearWeekDayTime());
StringConverter.INSTANCE.setInto(m, "P2Y4W3DT12H24M48S", null);
assertEquals(2, m.getYears());
assertEquals(4, m.getWeeks());
assertEquals(3, m.getDays());
assertEquals(12, m.getHours());
assertEquals(24, m.getMinutes());
assertEquals(48, m.getSeconds());
assertEquals(0, m.getMillis());
}
示例2: testSetIntoPeriod_Object3
import org.joda.time.PeriodType; //導入方法依賴的package包/類
public void testSetIntoPeriod_Object3() throws Exception {
MutablePeriod m = new MutablePeriod(PeriodType.yearWeekDayTime());
StringConverter.INSTANCE.setInto(m, "P2Y4W3DT12H24M48.034S", null);
assertEquals(2, m.getYears());
assertEquals(4, m.getWeeks());
assertEquals(3, m.getDays());
assertEquals(12, m.getHours());
assertEquals(24, m.getMinutes());
assertEquals(48, m.getSeconds());
assertEquals(34, m.getMillis());
}
示例3: testSetIntoPeriod_Object4
import org.joda.time.PeriodType; //導入方法依賴的package包/類
public void testSetIntoPeriod_Object4() throws Exception {
MutablePeriod m = new MutablePeriod(PeriodType.yearWeekDayTime());
StringConverter.INSTANCE.setInto(m, "P2Y4W3DT12H24M.056S", null);
assertEquals(2, m.getYears());
assertEquals(4, m.getWeeks());
assertEquals(3, m.getDays());
assertEquals(12, m.getHours());
assertEquals(24, m.getMinutes());
assertEquals(0, m.getSeconds());
assertEquals(56, m.getMillis());
}
示例4: testSetIntoPeriod_Object5
import org.joda.time.PeriodType; //導入方法依賴的package包/類
public void testSetIntoPeriod_Object5() throws Exception {
MutablePeriod m = new MutablePeriod(PeriodType.yearWeekDayTime());
StringConverter.INSTANCE.setInto(m, "P2Y4W3DT12H24M56.S", null);
assertEquals(2, m.getYears());
assertEquals(4, m.getWeeks());
assertEquals(3, m.getDays());
assertEquals(12, m.getHours());
assertEquals(24, m.getMinutes());
assertEquals(56, m.getSeconds());
assertEquals(0, m.getMillis());
}
示例5: testSetIntoPeriod_Object6
import org.joda.time.PeriodType; //導入方法依賴的package包/類
public void testSetIntoPeriod_Object6() throws Exception {
MutablePeriod m = new MutablePeriod(PeriodType.yearWeekDayTime());
StringConverter.INSTANCE.setInto(m, "P2Y4W3DT12H24M56.1234567S", null);
assertEquals(2, m.getYears());
assertEquals(4, m.getWeeks());
assertEquals(3, m.getDays());
assertEquals(12, m.getHours());
assertEquals(24, m.getMinutes());
assertEquals(56, m.getSeconds());
assertEquals(123, m.getMillis());
}
示例6: testSetIntoPeriod_Object7
import org.joda.time.PeriodType; //導入方法依賴的package包/類
public void testSetIntoPeriod_Object7() throws Exception {
MutablePeriod m = new MutablePeriod(1, 0, 1, 1, 1, 1, 1, 1, PeriodType.yearWeekDayTime());
StringConverter.INSTANCE.setInto(m, "P2Y4W3D", null);
assertEquals(2, m.getYears());
assertEquals(4, m.getWeeks());
assertEquals(3, m.getDays());
assertEquals(0, m.getHours());
assertEquals(0, m.getMinutes());
assertEquals(0, m.getSeconds());
assertEquals(0, m.getMillis());
}