internal static void Day(ref Moment moment) { var daysThisMonth = moment.DateTime().DaysInMonth(); while (moment.Day >= daysThisMonth) { moment.Day = moment.Day - daysThisMonth; moment.Month++; } }
private void SetDateRangeForQuarterIndex(int quarterIndex, ref Moment startMoment, ref Moment endMoment) { int currentQuarterIndex = Util.GetQuarterByOffset(DateTime.Now, 0); if (quarterIndex > currentQuarterIndex && Config.Direction == DateTimeDirection.Backward) //future quarter { startMoment.Year -= 1; } startMoment.Month = (quarterIndex - 1) * 3 + 1; endMoment = GetMoment(startMoment.DateTime()); endMoment.Month = startMoment.Month + 2; }