mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Fixed: Representation of episode start time when not starting at the full hour in am/pm notation
Co-Authored-By: Taloth <Taloth@users.noreply.github.com>
This commit is contained in:
parent
16321377fc
commit
17b93bcc57
@ -5,15 +5,17 @@ function formatTime(date, timeFormat, { includeMinuteZero = false, includeSecond
|
||||
return '';
|
||||
}
|
||||
|
||||
const time = moment(date);
|
||||
|
||||
if (includeSeconds) {
|
||||
timeFormat = timeFormat.replace(/\(?:mm\)?/, ':mm:ss');
|
||||
} else if (includeMinuteZero) {
|
||||
} else if (includeMinuteZero || time.minute() !== 0) {
|
||||
timeFormat = timeFormat.replace('(:mm)', ':mm');
|
||||
} else {
|
||||
timeFormat = timeFormat.replace('(:mm)', '');
|
||||
}
|
||||
|
||||
return moment(date).format(timeFormat);
|
||||
return time.format(timeFormat);
|
||||
}
|
||||
|
||||
export default formatTime;
|
||||
|
Loading…
Reference in New Issue
Block a user