This commit is contained in:
2020-03-04 16:31:09 +00:00
parent 207a520859
commit a97a8e4363
2 changed files with 24 additions and 3 deletions

View File

@@ -8,7 +8,7 @@
{ name: vm.lt("DateRangeThisWeek"), id: "**" },
{ name: vm.lt("DateRangeNextWeek"), id: "**" },
{ name: vm.lt("DateRangeLastMonth"), id: "**" },
{ name: vm.lt("DateRangeThisMonth"), id: "*thismonth*" },
{ name: vm.lt("DateRangeThisMonth"), id: "**" },
{ name: vm.lt("DateRangeNextMonth"), id: "*nextmonth*" },
{ name: vm.lt("DateRange14DayWindow"), id: "*14daywindow*" },
{ name: vm.lt("DateRangePast"), id: "*past*" },
@@ -165,6 +165,27 @@ export default {
//move after back a second for boundary
dtAfter = dtAfter.plus({ seconds: -1 });
//set return values from calculated values
ret.after = dtAfter.toUTC().toString();
ret.before = dtBefore.toUTC().toString();
break;
case "*thismonth*":
//start with the first day of this month
// dtAfter = new DateTime(RelativeToday.Year, RelativeToday.Month, 1, RelativeToday.Hour, RelativeToday.Minute, 00);
// //Add one month to dtAfter to get end date
// dtBefore = dtAfter.AddMonths(1);
// //case 1155
// dtAfter = dtAfter.AddSeconds(-1);
//start with the first day of this month
var dtAfter = window.$gz.DateTime.local(dtNow.year, dtNow.month, 1);
//Add one month to dtAfter to get end date
var dtBefore = dtAfter.plus({ months: 1 });
//move after back a second for boundary
dtAfter = dtAfter.plus({ seconds: -1 });
//set return values from calculated values
ret.after = dtAfter.toUTC().toString();
ret.before = dtBefore.toUTC().toString();