Cats.Helpers.EthiopianDate.GregToEthiopian C# (CSharp) Method

GregToEthiopian() private method

Gregs to ethiopian.
private GregToEthiopian ( ) : void
return void
        private void GregToEthiopian()
        {
            double jd = GregorianToJulianDate(_GregDate);
            var c = Math.Floor(jd) + 0.5 - jdEpoch;
            var year = Math.Floor((c - Math.Floor((c + 366) / 1461)) / 365) + 1;
            if (year <= 0) { year--; } // No year zero

            c = Math.Floor(jd) + 0.5 - EthiopianToJulian((int)year, 1, 1);
            var month = Math.Floor(c / 30) + 1;
            var day = (c - ((month - 1) * 30)) + 1;

            this.Day = (int)day;
            this.Month = (int)month;
            this.Year = (int)year;
            //return this.newDate(year, month, day);
        }