mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
client side code webstorm code cleanup.
This commit is contained in:
parent
375f887539
commit
445ea4f344
94 changed files with 4355 additions and 4243 deletions
|
@ -1,12 +1,22 @@
|
|||
function bestDateString(sourceDate){
|
||||
if (!sourceDate) return '';
|
||||
function bestDateString(sourceDate) {
|
||||
if (!sourceDate) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var date = Date.create(sourceDate);
|
||||
|
||||
if (date.isYesterday()) return 'Yesterday';
|
||||
if (date.isToday()) return 'Today';
|
||||
if (date.isTomorrow()) return 'Tomorrow';
|
||||
if (date.isAfter(Date.create('tomorrow')) && date.isBefore(Date.create().addDays(7))) return date.format('{Weekday}');
|
||||
if (date.isYesterday()) {
|
||||
return 'Yesterday';
|
||||
}
|
||||
if (date.isToday()) {
|
||||
return 'Today';
|
||||
}
|
||||
if (date.isTomorrow()) {
|
||||
return 'Tomorrow';
|
||||
}
|
||||
if (date.isAfter(Date.create('tomorrow')) && date.isBefore(Date.create().addDays(7))) {
|
||||
return date.format('{Weekday}');
|
||||
}
|
||||
|
||||
return date.format('{MM}/{dd}/{yyyy}');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue