From 6f5936e1e8a24544cd45799ab45f7e205be6c642 Mon Sep 17 00:00:00 2001 From: ByungWoo Lee Date: Mon, 24 Aug 2015 10:24:15 +0900 Subject: [PATCH] Modify api description Change-Id: Ibf79691553cf3a062a64a3b3c82e75158712c9bf --- src/include/mobile/utils_i18n_timezone.h | 4 ++-- src/include/mobile/utils_i18n_ucalendar.h | 2 +- src/include/mobile/utils_i18n_udate.h | 13 ++++++++----- src/include/wearable/utils_i18n_timezone.h | 4 ++-- src/include/wearable/utils_i18n_ucalendar.h | 2 +- src/include/wearable/utils_i18n_udate.h | 13 ++++++++----- src/utils_i18n_timezone.cpp | 5 ++--- 7 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/include/mobile/utils_i18n_timezone.h b/src/include/mobile/utils_i18n_timezone.h index a33865b..b34e617 100755 --- a/src/include/mobile/utils_i18n_timezone.h +++ b/src/include/mobile/utils_i18n_timezone.h @@ -289,8 +289,8 @@ int i18n_timezone_get_offset_with_date(i18n_timezone_h timezone, i18n_udate date int i18n_timezone_set_raw_offset(i18n_timezone_h timezone, int32_t offset_milliseconds); /** - * @brief Gets the region code associated with the given system time zone ID. - * @details The region code is either ISO 3166 2-letter country code or UN M.49 3-digit area code. When the time zone is not associated with a specific location, for example - "Etc/UTC", "EST5EDT", then this method returns "001" (UN M.49 area code for World). + * @brief Gets the i18n_timezone_h's raw GMT offset (i.e., the number of milliseconds + * to add to GMT to get local time, before taking daylight savings time into account). * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] timezone The i18n_timezone_h to get a raw offset. diff --git a/src/include/mobile/utils_i18n_ucalendar.h b/src/include/mobile/utils_i18n_ucalendar.h index 8dae458..7de77be 100644 --- a/src/include/mobile/utils_i18n_ucalendar.h +++ b/src/include/mobile/utils_i18n_ucalendar.h @@ -67,7 +67,7 @@ i18n_ustring_copy_ua(_tzid, tzid); // gets length of '_tzid' - i18n_ustring_get_length(_tzid, &len); + len = i18n_ustring_get_length(_tzid); // creates i18n_ucalendar_h ret = i18n_ucalendar_create(_tzid, len, "en_US", I18N_UCALENDAR_TRADITIONAL, &ucal); if (ret) { diff --git a/src/include/mobile/utils_i18n_udate.h b/src/include/mobile/utils_i18n_udate.h index f5eb738..d6504bb 100644 --- a/src/include/mobile/utils_i18n_udate.h +++ b/src/include/mobile/utils_i18n_udate.h @@ -172,19 +172,22 @@ extern "C" { * @brief Creates a new #i18n_udate_format_h for formatting and parsing dates and times. * @details A #i18n_udate_format_h may be used to format dates in calls to {@link i18n_udate_create()}. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @remarks Must release @a format using i18n_udate_destroy(). + * @remarks Must release @a format using i18n_udate_destroy().\n + * If @a pattern parameter is used, pass in #I18N_UDATE_PATTERN for @a time_style and @a date_style. \n + * #I18N_UDATE_PATTERN can only be used in this case, and has to be set for both @a time_style and @a date_style. * * @param[in] time_style The style used to format times\n One of #I18N_UDATE_FULL, #I18N_UDATE_LONG, - * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, or #I18N_UDATE_NONE (relative time styles + * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE (relative time styles * are not currently supported). * @param[in] date_style The style used to format dates\n One of #I18N_UDATE_FULL, #I18N_UDATE_LONG, * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_RELATIVE, #I18N_UDATE_LONG_RELATIVE, - * #I18N_UDATE_MEDIUM_RELATIVE, #I18N_UDATE_SHORT_RELATIVE, #I18N_UDATE_PATTERN, or #I18N_UDATE_NONE + * #I18N_UDATE_MEDIUM_RELATIVE, #I18N_UDATE_SHORT_RELATIVE, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE * @param[in] locale The locale specifying the formatting conventions. * @param[in] tz_id A timezone ID specifying the timezone to use\n If @c 0, use the default timezone. * @param[in] tz_id_len The length of @a tz_id, otherwise @c -1 if NULL-terminated. - * @param[in] pattern A pattern specifying the format to use. The pattern is generated by Udatepg module. - * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style. + * @param[in] pattern A pattern specifying the format to use. The pattern is generated by Udatepg module.\n + * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style.\n + * See remarks for additional conditions. * @param[in] pattern_len The number of characters in the pattern, or otherwise @c -1 if NULL-terminated. * @param[out] format A pointer to an #i18n_udate_format_h to use for formatting dates and times, otherwise @c 0 if an error occurs. * diff --git a/src/include/wearable/utils_i18n_timezone.h b/src/include/wearable/utils_i18n_timezone.h index f049329..b10955a 100755 --- a/src/include/wearable/utils_i18n_timezone.h +++ b/src/include/wearable/utils_i18n_timezone.h @@ -289,8 +289,8 @@ int i18n_timezone_get_offset_with_date(i18n_timezone_h timezone, i18n_udate date int i18n_timezone_set_raw_offset(i18n_timezone_h timezone, int32_t offset_milliseconds); /** - * @brief Gets the region code associated with the given system time zone ID. - * @details The region code is either ISO 3166 2-letter country code or UN M.49 3-digit area code. When the time zone is not associated with a specific location, for example - "Etc/UTC", "EST5EDT", then this method returns "001" (UN M.49 area code for World). + * @brief Gets the i18n_timezone_h's raw GMT offset (i.e., the number of milliseconds + * to add to GMT to get local time, before taking daylight savings time into account). * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] timezone The i18n_timezone_h to get a raw offset. diff --git a/src/include/wearable/utils_i18n_ucalendar.h b/src/include/wearable/utils_i18n_ucalendar.h index 8dae458..7de77be 100644 --- a/src/include/wearable/utils_i18n_ucalendar.h +++ b/src/include/wearable/utils_i18n_ucalendar.h @@ -67,7 +67,7 @@ i18n_ustring_copy_ua(_tzid, tzid); // gets length of '_tzid' - i18n_ustring_get_length(_tzid, &len); + len = i18n_ustring_get_length(_tzid); // creates i18n_ucalendar_h ret = i18n_ucalendar_create(_tzid, len, "en_US", I18N_UCALENDAR_TRADITIONAL, &ucal); if (ret) { diff --git a/src/include/wearable/utils_i18n_udate.h b/src/include/wearable/utils_i18n_udate.h index f5eb738..d6504bb 100644 --- a/src/include/wearable/utils_i18n_udate.h +++ b/src/include/wearable/utils_i18n_udate.h @@ -172,19 +172,22 @@ extern "C" { * @brief Creates a new #i18n_udate_format_h for formatting and parsing dates and times. * @details A #i18n_udate_format_h may be used to format dates in calls to {@link i18n_udate_create()}. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @remarks Must release @a format using i18n_udate_destroy(). + * @remarks Must release @a format using i18n_udate_destroy().\n + * If @a pattern parameter is used, pass in #I18N_UDATE_PATTERN for @a time_style and @a date_style. \n + * #I18N_UDATE_PATTERN can only be used in this case, and has to be set for both @a time_style and @a date_style. * * @param[in] time_style The style used to format times\n One of #I18N_UDATE_FULL, #I18N_UDATE_LONG, - * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, or #I18N_UDATE_NONE (relative time styles + * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE (relative time styles * are not currently supported). * @param[in] date_style The style used to format dates\n One of #I18N_UDATE_FULL, #I18N_UDATE_LONG, * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_RELATIVE, #I18N_UDATE_LONG_RELATIVE, - * #I18N_UDATE_MEDIUM_RELATIVE, #I18N_UDATE_SHORT_RELATIVE, #I18N_UDATE_PATTERN, or #I18N_UDATE_NONE + * #I18N_UDATE_MEDIUM_RELATIVE, #I18N_UDATE_SHORT_RELATIVE, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE * @param[in] locale The locale specifying the formatting conventions. * @param[in] tz_id A timezone ID specifying the timezone to use\n If @c 0, use the default timezone. * @param[in] tz_id_len The length of @a tz_id, otherwise @c -1 if NULL-terminated. - * @param[in] pattern A pattern specifying the format to use. The pattern is generated by Udatepg module. - * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style. + * @param[in] pattern A pattern specifying the format to use. The pattern is generated by Udatepg module.\n + * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style.\n + * See remarks for additional conditions. * @param[in] pattern_len The number of characters in the pattern, or otherwise @c -1 if NULL-terminated. * @param[out] format A pointer to an #i18n_udate_format_h to use for formatting dates and times, otherwise @c 0 if an error occurs. * diff --git a/src/utils_i18n_timezone.cpp b/src/utils_i18n_timezone.cpp index e3dad20..42c4d1f 100755 --- a/src/utils_i18n_timezone.cpp +++ b/src/utils_i18n_timezone.cpp @@ -393,12 +393,11 @@ int i18n_timezone_in_daylight_time(i18n_timezone_h timezone, i18n_udate date, i1 UErrorCode status = U_ZERO_ERROR; *daylight_time = ((TimeZone*)timezone)->inDaylightTime(date, status); - i18n_error_code_e i18n_error; + i18n_error_code_e i18n_error = I18N_ERROR_NONE; ERR_MAPPING(status, i18n_error); I18N_ERR(i18n_error); - return _i18n_error_mapping(status); - + return i18n_error; } int i18n_timezone_has_same_rule(i18n_timezone_h timezone, i18n_timezone_h other, i18n_ubool *same_rule) -- 2.34.1