Java 类org.joda.time.field.SkipDateTimeField 实例源码

项目:astor    文件:TestIllegalFieldValueException.java   
public void testSkipDateTimeField() {
    DateTimeField field = new SkipDateTimeField
        (ISOChronology.getInstanceUTC(), ISOChronology.getInstanceUTC().year(), 1970);
    try {
        field.set(0, 1970);
        fail();
    } catch (IllegalFieldValueException e) {
        assertEquals(DateTimeFieldType.year(), e.getDateTimeFieldType());
        assertEquals(null, e.getDurationFieldType());
        assertEquals("year", e.getFieldName());
        assertEquals(new Integer(1970), e.getIllegalNumberValue());
        assertEquals(null, e.getIllegalStringValue());
        assertEquals("1970", e.getIllegalValueAsString());
        assertEquals(null, e.getLowerBound());
        assertEquals(null, e.getUpperBound());
    }
}
项目:astor    文件:TestIllegalFieldValueException.java   
public void testSkipDateTimeField() {
    DateTimeField field = new SkipDateTimeField
        (ISOChronology.getInstanceUTC(), ISOChronology.getInstanceUTC().year(), 1970);
    try {
        field.set(0, 1970);
        fail();
    } catch (IllegalFieldValueException e) {
        assertEquals(DateTimeFieldType.year(), e.getDateTimeFieldType());
        assertEquals(null, e.getDurationFieldType());
        assertEquals("year", e.getFieldName());
        assertEquals(new Integer(1970), e.getIllegalNumberValue());
        assertEquals(null, e.getIllegalStringValue());
        assertEquals("1970", e.getIllegalValueAsString());
        assertEquals(null, e.getLowerBound());
        assertEquals(null, e.getUpperBound());
    }
}
项目:versemem-android    文件:TestIllegalFieldValueException.java   
public void testSkipDateTimeField() {
    DateTimeField field = new SkipDateTimeField
        (ISOChronology.getInstanceUTC(), ISOChronology.getInstanceUTC().year(), 1970);
    try {
        field.set(0, 1970);
        fail();
    } catch (IllegalFieldValueException e) {
        assertEquals(DateTimeFieldType.year(), e.getDateTimeFieldType());
        assertEquals(null, e.getDurationFieldType());
        assertEquals("year", e.getFieldName());
        assertEquals(new Integer(1970), e.getIllegalNumberValue());
        assertEquals(null, e.getIllegalStringValue());
        assertEquals("1970", e.getIllegalValueAsString());
        assertEquals(null, e.getLowerBound());
        assertEquals(null, e.getUpperBound());
    }
}
项目:TinyTravelTracker    文件:JulianChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);
        // Julian chronology has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);
    }
}
项目:TinyTravelTracker    文件:CopticChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);

        // Coptic, like Julian, has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);

        fields.era = ERA_FIELD;
        fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 13);
        fields.months = fields.monthOfYear.getDurationField();
    }
}
项目:TinyTravelTracker    文件:EthiopicChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);

        // Ethiopic, like Julian, has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);

        fields.era = ERA_FIELD;
        fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 13);
        fields.months = fields.monthOfYear.getDurationField();
    }
}
项目:astor    文件:JulianChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);
        // Julian chronology has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);
    }
}
项目:astor    文件:CopticChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);

        // Coptic, like Julian, has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);

        fields.era = ERA_FIELD;
        fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 13);
        fields.months = fields.monthOfYear.getDurationField();
    }
}
项目:astor    文件:EthiopicChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);

        // Ethiopic, like Julian, has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);

        fields.era = ERA_FIELD;
        fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 13);
        fields.months = fields.monthOfYear.getDurationField();
    }
}
项目:astor    文件:JulianChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);
        // Julian chronology has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);
    }
}
项目:astor    文件:CopticChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);

        // Coptic, like Julian, has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);

        fields.era = ERA_FIELD;
        fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 13);
        fields.months = fields.monthOfYear.getDurationField();
    }
}
项目:astor    文件:EthiopicChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);

        // Ethiopic, like Julian, has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);

        fields.era = ERA_FIELD;
        fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 13);
        fields.months = fields.monthOfYear.getDurationField();
    }
}
项目:idylfin    文件:JulianChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);
        // Julian chronology has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);
    }
}
项目:idylfin    文件:CopticChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);

        // Coptic, like Julian, has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);

        fields.era = ERA_FIELD;
        fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 13);
        fields.months = fields.monthOfYear.getDurationField();
    }
}
项目:idylfin    文件:EthiopicChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);

        // Ethiopic, like Julian, has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);

        fields.era = ERA_FIELD;
        fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 13);
        fields.months = fields.monthOfYear.getDurationField();
    }
}
项目:versemem-android    文件:JulianChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);
        // Julian chronology has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);
    }
}
项目:versemem-android    文件:CopticChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);

        // Coptic, like Julian, has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);

        fields.era = ERA_FIELD;
        fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 13);
        fields.months = fields.monthOfYear.getDurationField();
    }
}
项目:versemem-android    文件:EthiopicChronology.java   
protected void assemble(Fields fields) {
    if (getBase() == null) {
        super.assemble(fields);

        // Ethiopic, like Julian, has no year zero.
        fields.year = new SkipDateTimeField(this, fields.year);
        fields.weekyear = new SkipDateTimeField(this, fields.weekyear);

        fields.era = ERA_FIELD;
        fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 13);
        fields.months = fields.monthOfYear.getDurationField();
    }
}