Exemple #1
0
        private DateTime GetVernalEquinox(int year)
        {
            long   curYear = 0, month = 0, day = 0, hour = 0, minutes = 0;
            double seconds = 0;
            var    date    = new AASDate();
            var    spring  = AASEquinoxesAndSolstices.NorthwardEquinox(year, true);

            date.Set(spring, true);
            date.Get(ref curYear, ref month, ref day, ref hour, ref minutes, ref seconds);
            var dt       = new DateTime((int)curYear, (int)month, (int)day, (int)hour, (int)minutes, (int)seconds);
            var converDt = TimeZoneInfo.ConvertTimeFromUtc(dt, timeZone);

            return(converDt);
        }
        public void NorthwardEquinoxTest(long year, bool bHighPrecision, double expectedResult)
        {
            double marchEquinox = AASEquinoxesAndSolstices.NorthwardEquinox(year, bHighPrecision);

            Assert.Equal(expectedResult, marchEquinox);
        }