This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
{ name: vm.lt("DateRangeLastMonth"), id: "**" },
|
{ name: vm.lt("DateRangeLastMonth"), id: "**" },
|
||||||
{ name: vm.lt("DateRangeThisMonth"), id: "**" },
|
{ name: vm.lt("DateRangeThisMonth"), id: "**" },
|
||||||
{ name: vm.lt("DateRangeNextMonth"), id: "**" },
|
{ name: vm.lt("DateRangeNextMonth"), id: "**" },
|
||||||
{ name: vm.lt("DateRange14DayWindow"), id: "*14daywindow*" },
|
{ name: vm.lt("DateRange14DayWindow"), id: "**" },
|
||||||
{ name: vm.lt("DateRangePast"), id: "*past*" },
|
{ name: vm.lt("DateRangePast"), id: "*past*" },
|
||||||
{ name: vm.lt("DateRangeFuture"), id: "*future*" },
|
{ name: vm.lt("DateRangeFuture"), id: "*future*" },
|
||||||
{ name: vm.lt("DateRangeLastYear"), id: "*lastyear*" }, //prior year from jan to dec
|
{ name: vm.lt("DateRangeLastYear"), id: "*lastyear*" }, //prior year from jan to dec
|
||||||
@@ -196,6 +196,24 @@ export default {
|
|||||||
//move after back a second for boundary
|
//move after back a second for boundary
|
||||||
dtAfter = dtAfter.plus({ seconds: -1 });
|
dtAfter = dtAfter.plus({ seconds: -1 });
|
||||||
|
|
||||||
|
//set return values from calculated values
|
||||||
|
ret.after = dtAfter.toUTC().toString();
|
||||||
|
ret.before = dtBefore.toUTC().toString();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*14daywindow*":
|
||||||
|
//Start with today
|
||||||
|
var dtAfter = dtToday;
|
||||||
|
|
||||||
|
//subtract 7 days
|
||||||
|
dtAfter = dtAfter.plus({ days: -7 });
|
||||||
|
|
||||||
|
//Add 15 days to dtAfter to get end date
|
||||||
|
var dtBefore = dtAfter.plus({ days: 15 });
|
||||||
|
|
||||||
|
//move after back a second for boundary
|
||||||
|
dtAfter = dtAfter.plus({ seconds: -1 });
|
||||||
|
|
||||||
//set return values from calculated values
|
//set return values from calculated values
|
||||||
ret.after = dtAfter.toUTC().toString();
|
ret.after = dtAfter.toUTC().toString();
|
||||||
ret.before = dtBefore.toUTC().toString();
|
ret.before = dtBefore.toUTC().toString();
|
||||||
|
|||||||
@@ -916,8 +916,8 @@ function untokenizeListView(lv) {
|
|||||||
//iterate the array and build a new array with substituted tokens with the correct date and time in them
|
//iterate the array and build a new array with substituted tokens with the correct date and time in them
|
||||||
//console.log(lv);
|
//console.log(lv);
|
||||||
//console.log(JSON.parse(lv));
|
//console.log(JSON.parse(lv));
|
||||||
console.log("test:nextmonth");
|
console.log("test:14daywindow");
|
||||||
console.log(relativeDatefilterCalculator.tokenToDates("*nextmonth*"));
|
console.log(relativeDatefilterCalculator.tokenToDates("*14daywindow*"));
|
||||||
//[{"fld":"widgetname"},{"fld":"widgetstartdate","filter":{"items":[{"op":"=","value":"*past90days*","token":true}]}},{"fld":"widgetenddate"}]
|
//[{"fld":"widgetname"},{"fld":"widgetstartdate","filter":{"items":[{"op":"=","value":"*past90days*","token":true}]}},{"fld":"widgetenddate"}]
|
||||||
if (lv == null) {
|
if (lv == null) {
|
||||||
return lv;
|
return lv;
|
||||||
|
|||||||
Reference in New Issue
Block a user