1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update dialogs

This commit is contained in:
Luke Pulverenti 2016-09-07 16:11:16 -04:00
parent ab738fae14
commit 46043aae83
53 changed files with 478 additions and 374 deletions

View file

@ -111,6 +111,36 @@
date.toLocaleString();
}
function getLocaleDateStringParts(date) {
var day = getDayName(date);
date = toLocaleDateString(date);
var parts = [];
if (date.toLowerCase().indexOf(day.toLowerCase()) == -1) {
parts.push(day);
}
parts.push(date);
return parts;
}
function getDayName(date) {
var weekday = [];
weekday[0] = globalize.translate('sharedcomponents#Sunday');
weekday[1] = globalize.translate('sharedcomponents#Monday');
weekday[2] = globalize.translate('sharedcomponents#Tuesday');
weekday[3] = globalize.translate('sharedcomponents#Wednesday');
weekday[4] = globalize.translate('sharedcomponents#Thursday');
weekday[5] = globalize.translate('sharedcomponents#Friday');
weekday[6] = globalize.translate('sharedcomponents#Saturday');
return weekday[date.getDay()];
}
function toLocaleDateString(date) {
var currentLocale = globalize.getCurrentLocale();
@ -188,6 +218,7 @@
toLocaleDateString: toLocaleDateString,
toLocaleString: toLocaleString,
getDisplayTime: getDisplayTime,
isRelativeDay: isRelativeDay
isRelativeDay: isRelativeDay,
getLocaleDateStringParts: getLocaleDateStringParts
};
});