Correzione calcolo date sul finire anno (13° mese...)
This commit is contained in:
@@ -65,8 +65,8 @@
|
||||
break;
|
||||
|
||||
case DtUtils.PeriodSet.LastYear:
|
||||
this.Inizio = new DateTime(oggi.Year - 1, 1, 1);
|
||||
this.Fine = new DateTime(oggi.Year, 1, 1);
|
||||
this.Inizio = this.Fine.AddYears(-1);
|
||||
break;
|
||||
|
||||
case DtUtils.PeriodSet.LastWeek:
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
case DtUtils.PeriodSet.ThisMonth:
|
||||
this.Inizio = new DateTime(oggi.Year, oggi.Month, 1);
|
||||
this.Fine = new DateTime(oggi.Year, oggi.Month + 1, 1);
|
||||
this.Fine = this.Inizio.AddMonths(1);
|
||||
break;
|
||||
|
||||
case DtUtils.PeriodSet.ThisTrim:
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
case DtUtils.PeriodSet.ThisYear:
|
||||
this.Inizio = new DateTime(oggi.Year, 1, 1);
|
||||
this.Fine = new DateTime(oggi.Year + 1, 1, 1);
|
||||
this.Fine = this.Inizio.AddYears(1);
|
||||
break;
|
||||
|
||||
case DtUtils.PeriodSet.Select:
|
||||
|
||||
Reference in New Issue
Block a user