Esempio n. 1
0
        public static long FatorVencimento2000(Boleto boleto)
        {
            var  dateBase        = new DateTime(2000, 7, 3, 0, 0, 0);
            var  dataAtual       = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
            long rangeUtilizavel = Utils.DateDiff(DateInterval.Day, dataAtual, boleto.DataVencimento);

            while (boleto.DataVencimento > dateBase.AddDays(9999))
            {
                dateBase = boleto.DataVencimento.AddDays(-(((Utils.DateDiff(DateInterval.Day, dateBase, boleto.DataVencimento) - 9999) - 1) + 1000));
            }
            return(Utils.DateDiff(DateInterval.Day, dateBase, boleto.DataVencimento) + 1000);
        }