public override Int32 PeriodMandatoryBasis(MonthPeriod period)
 {
     if (period.Year() == 2013 && period.Month() < 8)
     {
         return(HealthProperties2013.BASIS_MANDATORY_FROM_01_TO_07);
     }
     return(Guides().MandatoryBasis());
 }
Example #2
0
        public static uint DateEndsInPeriod(MonthPeriod period, DateTime?dateEnds)
        {
            uint dayTermEnd = MonthPeriod.TERM_END_FINISHED;
            uint daysPeriod = (uint)DateTime.DaysInMonth((int)period.Year(), (int)period.Month());

            DateTime periodDateEnd = new DateTime((int)period.Year(), (int)period.Month(), (int)daysPeriod);

            if (dateEnds != null)
            {
                dayTermEnd = (uint)dateEnds.Value.Day;
            }

            if (dateEnds == null || dateEnds > periodDateEnd)
            {
                dayTermEnd = daysPeriod;
            }
            return(dayTermEnd);
        }
        public void Should_Return_Periods_Year_And_Month_2014_02()
        {
            MonthPeriod testPeriodTwo = new MonthPeriod(testPeriodCodeFeb);

            Assert.AreEqual(testPeriodTwo.Year(), 2014u);
            Assert.AreEqual(testPeriodTwo.Month(), 2u);

            Assert.AreEqual(testPeriodTwo.YearInt(), 2014);
            Assert.AreEqual(testPeriodTwo.MonthInt(), 2);
        }
        public void Should_Return_Periods_Year_And_Month_2014_01()
        {
            MonthPeriod testPeriodOne = new MonthPeriod(testPeriodCodeJan);

            Assert.AreEqual(testPeriodOne.Year(), 2014u);
            Assert.AreEqual(testPeriodOne.Month(), 1u);

            Assert.AreEqual(testPeriodOne.YearInt(), 2014);
            Assert.AreEqual(testPeriodOne.MonthInt(), 1);
        }
Example #5
0
        public static uint DateFromInPeriod(MonthPeriod period, DateTime?dateFrom)
        {
            uint dayTermFrom = MonthPeriod.TERM_BEG_FINISHED;

            DateTime periodDateBeg = new DateTime((int)period.Year(), (int)period.Month(), 1);

            if (dateFrom != null)
            {
                dayTermFrom = (uint)dateFrom.Value.Day;
            }

            if (dateFrom == null || dateFrom < periodDateBeg)
            {
                dayTermFrom = 1;
            }
            return(dayTermFrom);
        }