devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
18 lines (17 loc) • 790 B
JavaScript
/**
* DevExtreme (esm/__internal/scheduler/r1/timezone_calculator/utils.js)
* Version: 23.2.6
* Build date: Wed May 01 2024
*
* Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import timeZoneUtils from "../../m_utils_time_zone";
import {
TimeZoneCalculator
} from "./calculator";
export var createTimeZoneCalculator = currentTimeZone => new TimeZoneCalculator({
getClientOffset: date => timeZoneUtils.getClientTimezoneOffset(date),
tryGetCommonOffset: date => timeZoneUtils.calculateTimezoneByValue(currentTimeZone, date),
tryGetAppointmentOffset: (date, appointmentTimezone) => timeZoneUtils.calculateTimezoneByValue(appointmentTimezone, date)
});