C# Class Cats.Helpers.EthiopianDate

Show file Open project: edgecomputing/cats Class Usage Examples

Public Properties

Property Type Description
Day int
Month int
Year int

Public Methods

Method Description
CheckLeapYear ( ) : bool

Checks the leap year.

EthiopianDate ( ) : System

Initializes a new instance of the EthiopianDate class.

EthiopianDate ( System.DateTime dateTime ) : System

Initializes a new instance of the EthiopianDate class.

EthiopianDate ( int year, int month, int day ) : System

Initializes a new instance of the EthiopianDate class.

EthiopianDate ( string ddMMyyyy ) : System

Receives format in Ethiopian DD/MM/YYYY

EthiopianDayOfWeek ( int ethiopianYear, int ethiopianMonth, int ethiopianDay ) : DayOfWeek

Ethiopians the day of week.

EthiopianToGregorian ( string ethiopianDateDDMMYYYY ) : System.DateTime

Ethiopians to gregorian.

EthiopianToGregorian ( int hour ) : int

Ethiopians to gregorian.

EthiopianToGregorian ( int &year, int &month, int &day ) : void

Ethiopians to gregorian.

EthiopianToJulian ( int year, int month, int day ) : double

Ethiopians to julian.

GetDayOfWeek ( ) : DayOfWeek

Gets the day of week.

GetDayOfWeekInt ( ) : int

Gets the day of week int.

GetMonthName ( ) : string

Gets the name of the month.

GetMonthName ( int month ) : string
GetMonthNameEN ( ) : string
GetMonthNo ( string month ) : int
GregorianToEthiopian ( System.DateTime gregorianDate ) : string

Gregorians to ethiopian.

GregorianToEthiopian ( int &gregorianYear, int &gregorianMonth, int &gregorianDay ) : void

Gregorians to ethiopian.

GregorianToJulianDate ( System.DateTime date ) : double

Gregorians to julian date.

IsLeapYear ( ) : bool

Determines whether [is leap year].

SetDate ( int gregorianYear, int gregorianMonth, int gregorianDay ) : void

Input is gregorian calendar.

ToDateString ( ) : string

Toes the date string.

ToGregorianDate ( ) : System.DateTime

Toes the gregorian date.

ToLongDateString ( ) : string

Toes the long date string.

Protected Methods

Method Description
CheckLeapYear ( int gregorianYear, int gregorianMonth ) : bool

Checks the leap year.

Private Methods

Method Description
EthiopianToFixed ( int ethiopianYear, int ethiopianMonth, int ethiopianDay ) : int

Ethiopians to fixed.

FixedToEthiopian ( int fixedDate, int &year, int &month, int &day ) : void

Fixes to ethiopian.

FixedToGregorian ( int fixedDate, int &year, int &month, int &day ) : void

Fixeds to gregorian.

GetEthiopianDay ( int gregorianYear, int gregorianMonth, int gregorianDay ) : int

Just get the day in the Ethiopian Calandar.

GetEthiopianYear ( int gregorianYear, int gregorianMonth ) : int

Returns Ethiopian year as an output. Takes the gregorian date as input.

GregToEthiopian ( ) : void

Gregs to ethiopian.

GregorianToEthiopian ( int hour ) : int

Gregorians to ethiopian.

GregorianToFixed ( int gregorianYear, int gregorianMonth, int gregorianDay ) : int

Gregorians to fixed.

GregorianYearFromFixed ( int fixedDate ) : int

Gregorians the year from fixed.

Method Details

CheckLeapYear() public method

Checks the leap year.
public CheckLeapYear ( ) : bool
return bool

CheckLeapYear() protected static method

Checks the leap year.
protected static CheckLeapYear ( int gregorianYear, int gregorianMonth ) : bool
gregorianYear int The gregorian year.
gregorianMonth int The gregorian month.
return bool

EthiopianDate() public method

Initializes a new instance of the EthiopianDate class.
public EthiopianDate ( ) : System
return System

EthiopianDate() public method

Initializes a new instance of the EthiopianDate class.
public EthiopianDate ( System.DateTime dateTime ) : System
dateTime System.DateTime The date time.
return System

EthiopianDate() public method

Initializes a new instance of the EthiopianDate class.
public EthiopianDate ( int year, int month, int day ) : System
year int The year.
month int The month.
day int The day.
return System

EthiopianDate() public method

Receives format in Ethiopian DD/MM/YYYY
public EthiopianDate ( string ddMMyyyy ) : System
ddMMyyyy string
return System

EthiopianDayOfWeek() public method

Ethiopians the day of week.
public EthiopianDayOfWeek ( int ethiopianYear, int ethiopianMonth, int ethiopianDay ) : DayOfWeek
ethiopianYear int The ethiopian year.
ethiopianMonth int The ethiopian month.
ethiopianDay int The ethiopian day.
return DayOfWeek

EthiopianToGregorian() public static method

Ethiopians to gregorian.
public static EthiopianToGregorian ( string ethiopianDateDDMMYYYY ) : System.DateTime
ethiopianDateDDMMYYYY string The ethiopian date DDMMYYYY.
return System.DateTime

EthiopianToGregorian() public static method

Ethiopians to gregorian.
public static EthiopianToGregorian ( int hour ) : int
hour int The hour.
return int

EthiopianToGregorian() public static method

Ethiopians to gregorian.
public static EthiopianToGregorian ( int &year, int &month, int &day ) : void
year int The year.
month int The month.
day int The day.
return void

EthiopianToJulian() public static method

Ethiopians to julian.
public static EthiopianToJulian ( int year, int month, int day ) : double
year int The year.
month int The month.
day int The day.
return double

GetDayOfWeek() public method

Gets the day of week.
public GetDayOfWeek ( ) : DayOfWeek
return DayOfWeek

GetDayOfWeekInt() public method

Gets the day of week int.
public GetDayOfWeekInt ( ) : int
return int

GetMonthName() public method

Gets the name of the month.
public GetMonthName ( ) : string
return string

GetMonthName() public static method

public static GetMonthName ( int month ) : string
month int
return string

GetMonthNameEN() public method

public GetMonthNameEN ( ) : string
return string

GetMonthNo() public static method

public static GetMonthNo ( string month ) : int
month string
return int

GregorianToEthiopian() public static method

Gregorians to ethiopian.
public static GregorianToEthiopian ( System.DateTime gregorianDate ) : string
gregorianDate System.DateTime The gregorian date.
return string

GregorianToEthiopian() public static method

Gregorians to ethiopian.
public static GregorianToEthiopian ( int &gregorianYear, int &gregorianMonth, int &gregorianDay ) : void
gregorianYear int The gregorian year.
gregorianMonth int The gregorian month.
gregorianDay int The gregorian day.
return void

GregorianToJulianDate() public static method

Gregorians to julian date.
public static GregorianToJulianDate ( System.DateTime date ) : double
date System.DateTime The date.
return double

IsLeapYear() public method

Determines whether [is leap year].
public IsLeapYear ( ) : bool
return bool

SetDate() public method

Input is gregorian calendar.
public SetDate ( int gregorianYear, int gregorianMonth, int gregorianDay ) : void
gregorianYear int
gregorianMonth int
gregorianDay int
return void

ToDateString() public method

Toes the date string.
public ToDateString ( ) : string
return string

ToGregorianDate() public method

Toes the gregorian date.
public ToGregorianDate ( ) : System.DateTime
return System.DateTime

ToLongDateString() public method

Toes the long date string.
public ToLongDateString ( ) : string
return string

Property Details

Day public property

public int Day
return int

Month public property

public int Month
return int

Year public property

public int Year
return int