CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
hijri_calendar.h
1
2#pragma once
3
4#include <system/globalization/calendar.h>
5
6namespace System { namespace Globalization {
7
8class HijriCalendar;
11
16class ASPOSECPP_SHARED_CLASS HijriCalendar : public Calendar
17{
19 RTTI_INFO(System::Globalization::HijriCalendar, ::System::BaseTypesInfo<System::Globalization::Calendar>)
20
21public:
26
28 static constexpr int HijriEra = 1;
29
31 ASPOSECPP_SHARED_API HijriCalendar();
32
35 ASPOSECPP_SHARED_API int get_HijriAdjustment() const;
38 ASPOSECPP_SHARED_API void set_HijriAdjustment(int value);
39
40 ASPOSECPP_SHARED_API CalendarAlgorithmType get_AlgorithmType() const override;
41 ASPOSECPP_SHARED_API DateTime get_MinSupportedDateTime() const override;
42 ASPOSECPP_SHARED_API DateTime get_MaxSupportedDateTime() const override;
43 ASPOSECPP_SHARED_API ArrayPtr<int> get_Eras() const override;
44 ASPOSECPP_SHARED_API DayOfWeek GetDayOfWeek(DateTime time) const override;
45 ASPOSECPP_SHARED_API int GetLeapMonth(int year, int era) const override;
46 ASPOSECPP_SHARED_API bool IsLeapYear(int year, int era) const override;
47 ASPOSECPP_SHARED_API bool IsLeapMonth(int year, int month, int era) const override;
48 ASPOSECPP_SHARED_API bool IsLeapDay(int year, int month, int day, int era) const override;
49
50 ASPOSECPP_SHARED_API SharedPtr<Object> Clone() override;
51
52protected:
53 Details::CalendarId get_ID() const override;
54
55private:
57 int m_hijri_date_adjustment;
58
59 void VerifyYear(int year, int era) const override;
60 void VerifyMonth(int year, int month, int era) const override;
61 void VerifyDate(int year, int month, int day, int era) const override;
62
63 int EraToIcuEra(int era) const override;
64 int IcuEraToEra(int icu_era) const override;
65};
66
67}} // namespace System::Globalization
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
Calendar which defines how the dates are handled, calculated, formatted, etc. Setter operations are o...
Definition: calendar.h:38
virtual int GetLeapMonth(int year) const
Gets the leap month for the specified year.
virtual bool IsLeapDay(int year, int month, int day) const
Checks if the day is leap.
virtual bool IsLeapMonth(int year, int month) const
Checks if the month is leap.
virtual bool IsLeapYear(int year) const
Checks if the year is leap.
Hijri calendar. Objects of this class should only be allocated using System::MakeObject() function....
Definition: hijri_calendar.h:17
CalendarAlgorithmType get_AlgorithmType() const override
Gets algorithm type.
Details::CalendarId get_ID() const override
Gets calendar identifier.
DateTime get_MinSupportedDateTime() const override
Minimal point in time that is supported by the calendar.
DateTime get_MaxSupportedDateTime() const override
Maximal point in time that is supported by the calendar.
DayOfWeek GetDayOfWeek(DateTime time) const override
Gets day of week for the specified time point.
ArrayPtr< int > get_Eras() const override
Gets list of eras existing in calendar.
void set_HijriAdjustment(int value)
Sets hijri adjustment.
SharedPtr< Object > Clone() override
Creates a copy of the current object and returns a shared pointer to it.
bool IsLeapMonth(int year, int month, int era) const override
Checks if the month is leap.
bool IsLeapDay(int year, int month, int day, int era) const override
Checks if the day is leap.
bool IsLeapYear(int year, int era) const override
Checks if the year is leap.
int GetLeapMonth(int year, int era) const override
Gets the leap month for the specified year.
int get_HijriAdjustment() const
Gets hijri adjustment.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
CalendarId
Identifiers of known calendars.
Definition: calendar_id.h:8
CalendarAlgorithmType
Calendar type.
Definition: calendar_algorithm_type.h:10
SharedPtr< HijriCalendar > HijriCalendarPtr
HijriCalendar pointer type.
Definition: hijri_calendar.h:10
Definition: db_command.h:9
DayOfWeek
Enumeration that represents a day of week.
Definition: day_of_week.h:11