This commit is contained in:
@@ -14,10 +14,10 @@ export default {
|
||||
// type: "GzDashTestListWidgetsPriciest"
|
||||
// },
|
||||
{
|
||||
id: "TestScheduleableOnly",
|
||||
id: "NextSchedItems",
|
||||
roles: [role.Tech, role.TechRestricted],
|
||||
title: "TEST sched user widget",
|
||||
type: "NextSchedItem",
|
||||
type: "NextSchedItems",
|
||||
scheduleableUserOnly: true
|
||||
},
|
||||
{
|
||||
|
||||
@@ -408,6 +408,29 @@ export default {
|
||||
return dt.toUTC().toString();
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// UTC ISO 8601 string add arbitrary value based
|
||||
// on luxon duration format
|
||||
// and return as UTC ISO 8601 string
|
||||
//https://moment.github.io/luxon/api-docs/index.html#datetimeplus
|
||||
//
|
||||
addDurationToUTC8601String(val, duration) {
|
||||
if (!val || val == "" || duration == null || !this.isObject(duration)) {
|
||||
return val;
|
||||
}
|
||||
//instantiate a luxon date object from val which is assumed to be an iso string
|
||||
let dt = window.$gz.DateTime.fromISO(val);
|
||||
if (!dt.isValid) {
|
||||
console.error("locale::addDurationToUTC8601String, input not valid:", {
|
||||
val: val,
|
||||
dt: dt
|
||||
});
|
||||
return val;
|
||||
}
|
||||
//add minutes
|
||||
dt = dt.plus(duration);
|
||||
return dt.toUTC().toString();
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// parse UTC ISO 8601 strings, diff, return hours
|
||||
//
|
||||
diffHoursFromUTC8601String(start, stop) {
|
||||
|
||||
Reference in New Issue
Block a user