Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/@formatjs/ecma402-abstract/DateTimeFormat/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DateTimeStyleFormat = void 0;
var utils_1 = require("../utils");
function DateTimeStyleFormat(dateStyle, timeStyle, dataLocaleData) {
var dateFormat, timeFormat;
if (timeStyle !== undefined) {
utils_1.invariant(timeStyle === 'full' ||
timeStyle === 'long' ||
timeStyle === 'medium' ||
timeStyle === 'short', 'invalid timeStyle');
timeFormat = dataLocaleData.timeFormat[timeStyle];
}
if (dateStyle !== undefined) {
utils_1.invariant(dateStyle === 'full' ||
dateStyle === 'long' ||
dateStyle === 'medium' ||
dateStyle === 'short', 'invalid dateStyle');
dateFormat = dataLocaleData.dateFormat[dateStyle];
}
if (dateStyle !== undefined && timeStyle !== undefined) {
var format = {};
for (var field in dateFormat) {
if (field !== 'pattern') {
// @ts-ignore
format[field] = dateFormat[field];
}
}
for (var field in timeFormat) {
if (field !== 'pattern' && field !== 'pattern12') {
// @ts-ignore
format[field] = timeFormat[field];
}
}
var connector = dataLocaleData.dateTimeFormat[dateStyle];
var pattern = connector
.replace('{0}', timeFormat.pattern)
.replace('{1}', dateFormat.pattern);
format.pattern = pattern;
if ('pattern12' in timeFormat) {
var pattern12 = connector
.replace('{0}', timeFormat.pattern12)
.replace('{1}', dateFormat.pattern);
format.pattern12 = pattern12;
}
return format;
}
if (timeStyle !== undefined) {
return timeFormat;
}
utils_1.invariant(dateStyle !== undefined, 'dateStyle should not be undefined');
return dateFormat;
}
exports.DateTimeStyleFormat = DateTimeStyleFormat;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0047 ]-- |