Ejemplo n.º 1
0
        public static void TestMe()
        {
            int    year         = 2020;
            int    month        = 9;
            int    day          = 2;
            double lat          = 57.708900;
            double lng          = 11.974600;
            string timeZoneName = System.TimeZoneInfo.Local.Id;

            SolarCalculator solarCalculator = new SolarCalculator();

            SolarEvents solarEvents = solarCalculator.Calculate(year, month, day, 57.708900, 11.974600, timeZoneName);

            System.Console.WriteLine("Sunrise: " + solarEvents.Sunrise);
            System.Console.WriteLine("Sunset: " + solarEvents.Sunset);
        }
Ejemplo n.º 2
0
        // https://dotnetfiddle.net/N3j5th
        public static void TestMe()
        {
            // http://www.stargazing.net/kepler/sunrise.html
            int    year         = 2020;
            int    month        = 9;
            int    day          = 2;
            double lat          = 57.708900;
            double lng          = 11.974600;
            string timeZoneName = System.TimeZoneInfo.Local.Id;

            SolarCalculator solarCalculator = new SolarCalculator();

            SolarEvents solarEvents = solarCalculator.Calculate(year, month, day, lat, lng, timeZoneName);

            System.Console.WriteLine("Sunrise: " + solarEvents.Sunrise);
            System.Console.WriteLine("Sunset: " + solarEvents.Sunset);
        }