UNPKG

devextreme

Version:

JavaScript/TypeScript Component Suite for Responsive Web Development

19 lines (18 loc) 804 B
/** * DevExtreme (esm/__internal/scheduler/r1/timezone_calculator/utils.js) * Version: 26.1.4 * Build date: Fri Jul 24 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import timeZoneUtils from "../../utils_time_zone"; import { TimeZoneCalculator } from "./calculator"; export const createTimeZoneCalculator = currentTimeZone => new TimeZoneCalculator({ timeZone: currentTimeZone, getClientOffset: date => timeZoneUtils.getClientTimezoneOffset(date), tryGetCommonOffset: date => timeZoneUtils.calculateTimezoneByValue(currentTimeZone, date), tryGetAppointmentOffset: (date, appointmentTimezone) => timeZoneUtils.calculateTimezoneByValue(appointmentTimezone, date) });