CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
timezone.h
1
3#ifndef _timezone_h_
4#define _timezone_h_
5#include "system/object.h"
6#include "system/date_time.h"
7#include "system/timespan.h"
8
9namespace System
10{
11
12class TimeZone;
15
16namespace Globalization {
17class DaylightTime;
20}
21
22
27class ASPOSECPP_SHARED_CLASS TimeZone : public System::Object
28{
29public:
31 virtual ASPOSECPP_SHARED_API String get_DaylightName() const = 0;
33 virtual ASPOSECPP_SHARED_API String get_StandardName() const = 0;
34
35 // at the moment GetUtcOffset works only for DateTime::Now
39 virtual ASPOSECPP_SHARED_API TimeSpan GetUtcOffset(DateTime time) = 0;
40
43 virtual ASPOSECPP_SHARED_API bool IsDaylightSavingTime(DateTime time) = 0;
44
47 virtual ASPOSECPP_SHARED_API Globalization::DaylightTimePtr GetDaylightChanges(int32_t year) = 0;
48
50 static ASPOSECPP_SHARED_API TimeZonePtr get_CurrentTimeZone();
51
52protected:
54 ASPOSECPP_SHARED_API TimeZone();
55};
56
57} // namespace System
58#endif // _timezone_h_
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Represents a time interval. This type should be allocated on stack and passed to functions by value o...
Definition: timespan.h:59
Represents a time zone. Objects of this class should only be allocated using System::MakeObject() fun...
Definition: timezone.h:28
virtual Globalization::DaylightTimePtr GetDaylightChanges(int32_t year)=0
Returns the daylight saving time period for a particular year.
virtual TimeSpan GetUtcOffset(DateTime time)=0
Returns the UTC offset for the specified local time.
virtual bool IsDaylightSavingTime(DateTime time)=0
Determines if the date and time value represented by the specified DateTime object falls in the range...
virtual String get_StandardName() const =0
Returns a name for the standard time of the time zone represented by the current object.
TimeZone()
Constructs a new instance of TimZone class.
virtual String get_DaylightName() const =0
Returns a name for the daylight saving time of the time zone represented by the current object.
static TimeZonePtr get_CurrentTimeZone()
Returns a new instance of TimeZone class that represents the current time zone.
SharedPtr< DaylightTime > DaylightTimePtr
DaylightTime pointer type.
Definition: daylight_time.h:12
Definition: db_command.h:9
SharedPtr< TimeZone > TimeZonePtr
Shared pointer to an instance of TimeZone class.
Definition: timezone.h:14