mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Removed mutators from EpisodeModel
This commit is contained in:
@@ -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}');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user