public void Test__Cycle()
        {
            // Arrange
            var (expectedYear, expectedMonth, expectedDay) = (2010, 1, 2);

            // Act
            var (year, month, day) = JulianNumberUtility.GregorianDate(JulianNumberUtility.JulianNumber(expectedYear, expectedMonth, expectedDay));

            // Assert
            Assert.Equal((expectedYear, expectedMonth, expectedDay), (year, month, day));
        }
        public void Test__GregorianDate()
        {
            // Arrange
            var (year, month, day) = (2010, 1, 2);
            
            // Act
            var number = JulianNumberUtility.GregorianDate(2455199);

            // Assert
            Assert.Equal((year, month, day), number);
        }
Beispiel #3
0
 /// <summary>
 /// Converts given Julian Number integer to LocalDate
 /// </summary>
 /// <param name="source"></param>
 /// <returns></returns>
 public static LocalDate ToGregorian(this int source)
 {
     var(year, month, day) = JulianNumberUtility.GregorianDate(source);
     return(new LocalDate(year, month, day));
 }