This commit is contained in:
@@ -943,6 +943,36 @@ export default {
|
||||
"https://yandex.ru/maps/?mode=search&text={ayaddress}&z=17<|>https://yandex.ru/maps/?ll={aylatitude},{aylongitude}&z=12&l=map"
|
||||
}
|
||||
];
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// v-calendar view to AyaNova scheduleview enum
|
||||
//
|
||||
//
|
||||
calendarViewToAyaNovaEnum: function(view) {
|
||||
/*
|
||||
public enum ScheduleView : int
|
||||
{
|
||||
Day = 1,
|
||||
Week = 2,
|
||||
Month = 3,
|
||||
Day4 = 4
|
||||
}
|
||||
*/
|
||||
switch (view) {
|
||||
case "day":
|
||||
return 1;
|
||||
case "week":
|
||||
return 2;
|
||||
case "month":
|
||||
return 3;
|
||||
case "4day":
|
||||
return 4;
|
||||
|
||||
default:
|
||||
throw new Error(
|
||||
`gzutil->calendarViewtoAyaNovaEnum - Unknown view type '${view}'`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -75,6 +75,41 @@ export default {
|
||||
getHour12() {
|
||||
return window.$gz.store.state.userOptions.hour12;
|
||||
},
|
||||
//////////////////////////////////////////////////
|
||||
// Get the user's chosen / auto time zone offset
|
||||
//
|
||||
getTZOffset(timeZoneName) {
|
||||
if (!timeZoneName) {
|
||||
timeZoneName = this.getResolvedTimeZoneName();
|
||||
}
|
||||
let dtNow = window.$gz.DateTime.local();
|
||||
var rezoned = dtNow.setZone(timeZoneName);
|
||||
return rezoned.offset;
|
||||
},
|
||||
// ///////////////////////////////////////////
|
||||
// // Convert timestamp utc epoch value
|
||||
// // to local timestamp epoch value
|
||||
// //
|
||||
// utcEpochToLocalEpoch(value, timeZoneName) {
|
||||
// if (!value) {
|
||||
// return null;
|
||||
// }
|
||||
// if (!timeZoneName) {
|
||||
// timeZoneName = this.getResolvedTimeZoneName();
|
||||
// }
|
||||
|
||||
// let parsedDate = new Date(value);
|
||||
|
||||
// //is it a valid date?
|
||||
// if (!(parsedDate instanceof Date && !isNaN(parsedDate))) {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// return parsedDate.toLocaleDateString(languageName, {
|
||||
// timeZone: timeZoneName,
|
||||
// dateStyle: "short"
|
||||
// });
|
||||
// },
|
||||
///////////////////////////////////////////
|
||||
// Turn a utc date into a displayable
|
||||
// short date and time
|
||||
|
||||
Reference in New Issue
Block a user