This commit is contained in:
2020-12-23 21:24:24 +00:00
parent 5caf2acb23
commit d114d7175b
6 changed files with 64 additions and 11 deletions

View File

@@ -188,6 +188,25 @@ export default {
.toString();
},
///////////////////////////////////////////////
// Get default start date time in api format
// (this is used to centralize and for future)
defaultStartDateTime(ofType) {
//ofType in future could be for
//different areas having different custom start / top times
//so will set that in all callers for future purposes, but
//for now, here going to ignore it and just default to now
//and now plus one hour
return {
start: window.$gz.DateTime.local()
.toUTC()
.toString(),
end: window.$gz.DateTime.local()
.plus({ hours: 1 })
.toUTC()
.toString()
};
},
///////////////////////////////////////////////
// Convert a utc date to local time zone
// and return date only portion only in iso 8601
// format (used by time and date picker components)