} else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_RECURRENCE_RULE_SET_POSITION)) {
return converter.toJSValueRef(rrule->getSetPosition());
} else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_RECURRENCE_RULE_EXCEPTIONS)) {
- JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
- if (NULL == jsResult) {
- ThrowMsg(NullPointerException, "Can not create array object.");
- }
-
- for (std::size_t i = 0; i < rrule->getExceptions().size(); ++i) {
- JSValueRef tmpVal = timeConverter.toJSValueRefTZDate((double)(rrule->getExceptions().at(i)*1000.0), rrule->getTimeZone());
- if (!JSSetArrayElement(context, jsResult, i, tmpVal)) {
- ThrowMsg(UnknownException, "Can not insert value into array.");
- }
- }
-
- return jsResult;
+ return converter.toJSValueRef(rrule->getExceptions());
}
}
Catch(Exception)
rrule->setDaysOfTheMonth(daysOfTheMonth);
return true;*/
} else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_RECURRENCE_RULE_DAYS_OF_THE_WEEK)) {
- std::vector<std::string> daysOfTheWeek = converter.toVectorOfStrings(value);
- rrule->setDaysOfTheWeek(daysOfTheWeek);
+ rrule->setDaysOfTheWeek(converter.toStringArray(value));
return true;
/*} else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_RECURRENCE_RULE_DAYS_OF_THE_YEAR)) {
std::vector<int> daysOfTheYear = converter.toVectorOfInts(value);
rrule->setSetPosition(setPosition);*/
return true;
} else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_RECURRENCE_RULE_EXCEPTIONS)) {
- // Only save the converted time info.
- rrule->setExceptions(converter.toVectorOfTimeFromTZDate(value));
+ rrule->setExceptions(converter.toNumberArray(value));
return true;
}
}