mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Removed mutators from EpisodeModel
This commit is contained in:
parent
83fe07524a
commit
e164df217d
8 changed files with 95 additions and 70 deletions
|
@ -14,4 +14,33 @@ define(
|
|||
|
||||
return new Handlebars.SafeString(result);
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('Day', function (input) {
|
||||
if (!input) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return Date.create(input).format('{dd}');
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('Month', function (input) {
|
||||
if (!input) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return Date.create(input).format('{Mon}');
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('StartTime', function (input) {
|
||||
if (!input) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var date = Date.create(input);
|
||||
if (date.format('{mm}') === '00') {
|
||||
return date.format('{h}{tt}');
|
||||
}
|
||||
|
||||
return date.format('{h}.{mm}{tt}');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue