This commit is contained in:
@@ -41,10 +41,20 @@ export default {
|
|||||||
throw "relative-date-filter-calculator: date token is null or empty";
|
throw "relative-date-filter-calculator: date token is null or empty";
|
||||||
}
|
}
|
||||||
//Luxon object: window.$gz.DateTime
|
//Luxon object: window.$gz.DateTime
|
||||||
|
|
||||||
|
//return object contains the two dates that encompass the time period
|
||||||
|
//the token represents to the local browser time zone but in UTC
|
||||||
|
//and iso8601 format
|
||||||
|
var ret = { after: undefined, before: undefined };
|
||||||
|
|
||||||
var dtStart = new Date();
|
var dtStart = new Date();
|
||||||
var dtEnd = new Date();
|
var dtEnd = new Date();
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case "*yesterday*":
|
case "*yesterday*":
|
||||||
|
//Between Day before yesterday at midnight and yesterday at midnight
|
||||||
|
// dtAfter = RelativeToday.AddDays(-1);
|
||||||
|
// dtAfter = dtAfter.AddSeconds(-1);
|
||||||
|
// dtBefore = RelativeToday;//.AddDays(-1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +66,6 @@ export default {
|
|||||||
//LUXON MATH: https://moment.github.io/luxon/docs/manual/zones.html#math-across-dsts
|
//LUXON MATH: https://moment.github.io/luxon/docs/manual/zones.html#math-across-dsts
|
||||||
//https://moment.github.io/luxon/docs/manual/math.html
|
//https://moment.github.io/luxon/docs/manual/math.html
|
||||||
|
|
||||||
|
|
||||||
// //############################################################### OLD SERVER FILTERING CODE ##########################
|
// //############################################################### OLD SERVER FILTERING CODE ##########################
|
||||||
|
|
||||||
// //HOWEVER, if it's a relative date filter TOKEN like "nextMonth" then the users time zone offset will be taken into consideration
|
// //HOWEVER, if it's a relative date filter TOKEN like "nextMonth" then the users time zone offset will be taken into consideration
|
||||||
|
|||||||
Reference in New Issue
Block a user