diff options
Diffstat (limited to 'lib-apps-common/inc/I18n/Date.h')
-rw-r--r-- | lib-apps-common/inc/I18n/Date.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/lib-apps-common/inc/I18n/Date.h b/lib-apps-common/inc/I18n/Date.h new file mode 100644 index 0000000..3cf6d37 --- /dev/null +++ b/lib-apps-common/inc/I18n/Date.h @@ -0,0 +1,48 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef I18N_DATE_H +#define I18N_DATE_H + +#include <ctime> +#include <utils_i18n_types.h> + +namespace I18n +{ + namespace Date + { + /** + * @return Current local date. + */ + EXPORT_API tm getCurrentDate(); + + /** + * @brief Convert local date to UTC date. + * @param[in] date Date to convert + * @return UTC date. + */ + EXPORT_API tm convertToUtc(const tm &date); + + /** + * @brief Convert local date to i18n_udate. + * @param[in] date Date to convert + * @return Date in i18n_udate format. + */ + EXPORT_API i18n_udate convertToUdate(const tm &date); + } +} + +#endif /* I18N_DATE_H */ |