devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
43 lines (41 loc) • 1.79 kB
JavaScript
/**
* DevExtreme (cjs/__internal/scheduler/utils/global_formats.js)
* Version: 26.1.3
* Build date: Wed Jun 10 2026
*
* Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.formatImplicitSchedulerTime = exports.formatImplicitSchedulerMonth = exports.formatImplicitSchedulerDate = void 0;
var _date = _interopRequireDefault(require("../../../common/core/localization/date"));
var _m_global_format_config = require("../../core/m_global_format_config");
function _interopRequireDefault(e) {
return e && e.__esModule ? e : {
default: e
}
}
const formatImplicitSchedulerDate = date => {
const globalDateFormat = (0, _m_global_format_config.getGlobalFormatByDataType)("date");
if (globalDateFormat) {
return _date.default.format(date, globalDateFormat)
}
return `${_date.default.format(date,"monthAndDay")}, ${_date.default.format(date,"year")}`
};
exports.formatImplicitSchedulerDate = formatImplicitSchedulerDate;
const formatImplicitSchedulerMonth = date => {
const globalDateFormat = (0, _m_global_format_config.getGlobalFormatByDataType)("date");
if (globalDateFormat) {
return _date.default.format(date, globalDateFormat)
}
return String(_date.default.format(date, "monthAndYear"))
};
exports.formatImplicitSchedulerMonth = formatImplicitSchedulerMonth;
const formatImplicitSchedulerTime = date => {
const globalTimeFormat = (0, _m_global_format_config.getGlobalFormatByDataType)("time");
return _date.default.format(date, globalTimeFormat || "shorttime")
};
exports.formatImplicitSchedulerTime = formatImplicitSchedulerTime;