mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 14:43:08 +03:00
Fixed schedule date formatting (#20236)
DES-355 There's been an orphan in the schedule toast notification and the date format was non-standard.
This commit is contained in:
parent
8bc035ccb7
commit
fb44c2393c
@ -1294,13 +1294,14 @@ export default class LexicalEditorController extends Controller {
|
||||
description.push(`${!emailOnly ? 'and delivered ' : ''}to <span><strong>${recipientCount}</strong></span>`);
|
||||
}
|
||||
|
||||
description.push(`on <span><strong>${publishedAtBlogTZ.format('MMM Do')}</strong></span>`);
|
||||
description.push(`at <span><strong>${publishedAtBlogTZ.format('HH:mm')}</strong>`);
|
||||
description.push(`on <span><strong>${publishedAtBlogTZ.format('D MMM YYYY')}</strong></span>`);
|
||||
let timeZoneLabel = '';
|
||||
if (publishedAtBlogTZ.utcOffset() === 0) {
|
||||
description.push('(UTC)</span>');
|
||||
timeZoneLabel = '(UTC)</span>';
|
||||
} else {
|
||||
description.push(`(UTC${publishedAtBlogTZ.format('Z').replace(/([+-])0/, '$1').replace(/:00/, '')})</span>`);
|
||||
timeZoneLabel = `(UTC${publishedAtBlogTZ.format('Z').replace(/([+-])0/, '$1').replace(/:00/, '')})</span>`;
|
||||
}
|
||||
description.push(`at <span><strong>${publishedAtBlogTZ.format('HH:mm')}</strong> ${timeZoneLabel}`);
|
||||
|
||||
description = htmlSafe(description.join(' '));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user