示例#1
0
            public LargeTimeSpan(DateTime begin, DateTime end)
            {
                Begin = begin;
                End   = end;

                MonthCount = MotorUtility.MonthCountBetween(begin, end);
                YearCount  = MonthCount / 12 /* months in year */;
                WeekCount  = MotorUtility.WeekCountBetween(begin, end);
            }
示例#2
0
 static void ShowMonthsBetween(DateTime datetimeBegin, DateTime datetimeEnd)
 {
     Console.WriteLine("Months between {0} and {1} is {2}", datetimeBegin.ToString(), datetimeEnd.ToString(), MotorUtility.MonthCountBetween(datetimeBegin, datetimeEnd));
 }