2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #ifndef _ABSTRACT_LAYER_ITZDATE_H_
20 #define _ABSTRACT_LAYER_ITZDATE_H_
24 #include <dpl/shared_ptr.h>
25 #include "DurationProperties.h"
26 #include "TZDateProperties.h"
43 TZDATE_DAY_OF_WEEK_IN_MONTH,
68 virtual bool isNull() =0;
69 virtual long get(const TZDateFields field) =0;
70 virtual std::string getTimezone() =0;
71 virtual TZDateProperties toTimezone(const std::string timezone) =0;
72 virtual void set(const TZDateFields field, const long value) = 0;
74 virtual long getUTC(const TZDateFields field) = 0;
75 virtual void setUTC(const TZDateFields field, const long value) = 0;
77 virtual long long difference(const TZDateProperties &prop) =0;
78 virtual TZDateProperties addDuration(const DurationProperties &duration) =0;
79 virtual TZDateProperties toUTC() =0;
80 virtual TZDateProperties toLocalTimezone() =0;
81 virtual double getTime() =0;
82 virtual std::string toDateString(bool bLocale = false) =0;
83 virtual std::string toTimeString(bool bLocale = false)=0;
84 virtual std::string toString(bool bLocale = false) =0;
86 virtual std::string getTimezoneAbbreviation() =0;
87 virtual long secondsFromUTC() =0;
88 virtual bool isDST() =0;
89 virtual TZDateProperties getDSTTransition(DSTTransition trans) =0;
92 typedef DPL::SharedPtr<ITZDate> ITZDatePtr;
98 #endif /* _ABSTRACT_LAYER_IDATETIME_H_ */