DateTimeFieldsState DateTimeFieldsState::restoreFormControlState(const FormControlState& state)
{
    DateTimeFieldsState dateTimeFieldsState;
    dateTimeFieldsState.setYear(getNumberFromFormControlState(state, 0));
    dateTimeFieldsState.setMonth(getNumberFromFormControlState(state, 1));
    dateTimeFieldsState.setDayOfMonth(getNumberFromFormControlState(state, 2));
    dateTimeFieldsState.setHour(getNumberFromFormControlState(state, 3));
    dateTimeFieldsState.setMinute(getNumberFromFormControlState(state, 4));
    dateTimeFieldsState.setSecond(getNumberFromFormControlState(state, 5));
    dateTimeFieldsState.setMillisecond(getNumberFromFormControlState(state, 6));
    dateTimeFieldsState.setWeekOfYear(getNumberFromFormControlState(state, 7));
    dateTimeFieldsState.setAMPM(getAMPMFromFormControlState(state, 8));
    return dateTimeFieldsState;
}
Ejemplo n.º 2
0
void DateTimeSecondFieldElement::populateDateTimeFieldsState(DateTimeFieldsState& dateTimeFieldsState)
{
    dateTimeFieldsState.setSecond(hasValue() ? valueAsInteger() : DateTimeFieldsState::emptyValue);
}