Exemplo n.º 1
0
        public string MidnightByDate(string ActiveDate)
        {
            var Day       = CalendarClass.DayNumber(ActiveDate);
            var Month     = CalendarClass.MonthCode(ActiveDate);
            var tmpmidday = MiddayPrayer(byte.Parse(Month), byte.Parse(Day), _Longitude).ToString().Substring(0, 5);

            var hrs = int.Parse(tmpmidday.Substring(0, 2)) + 11;
            var min = int.Parse(tmpmidday.Substring(3, 2)) + 17;

            if (min > 60)
            {
                min -= 60;
                hrs += 1;
            }

            if (hrs > 24)
            {
                hrs = 0;
            }

            var strmin = min.ToString();

            if (min < 10)
            {
                strmin = "0" + strmin;
            }

            return((hrs).ToString() + ":" + strmin);
        }
Exemplo n.º 2
0
        public string SunsetPrayerByDate(string ActiveDate)
        {
            var Day   = CalendarClass.DayNumber(ActiveDate);
            var Month = CalendarClass.MonthCode(ActiveDate);

            return(SunsetPrayer(byte.Parse(Month), byte.Parse(Day), _Longitude, _Latitude).ToString().Substring(0, 5));
        }