diff --git a/l10n/en-US/viewer.ftl b/l10n/en-US/viewer.ftl index cea54a28242ae0..bd7bb4ac0fa440 100644 --- a/l10n/en-US/viewer.ftl +++ b/l10n/en-US/viewer.ftl @@ -283,9 +283,8 @@ pdfjs-rendering-error = An error occurred while rendering the page. ## Annotations # Variables: -# $date (Date) - the modification date of the annotation -# $time (Time) - the modification time of the annotation -pdfjs-annotation-date-string = { $date }, { $time } +# $dateObj (Date) - the modification date and time of the annotation +pdfjs-annotation-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") } # .alt: This is used as a tooltip. # Variables: diff --git a/src/display/annotation_layer.js b/src/display/annotation_layer.js index dff737b6ca6d72..9d8ad8dceeef2b 100644 --- a/src/display/annotation_layer.js +++ b/src/display/annotation_layer.js @@ -2242,14 +2242,11 @@ class PopupElement { modificationDate.classList.add("popupDate"); modificationDate.setAttribute( "data-l10n-id", - "pdfjs-annotation-date-string" + "pdfjs-annotation-date-time-string" ); modificationDate.setAttribute( "data-l10n-args", - JSON.stringify({ - date: this.#dateObj.toLocaleDateString(), - time: this.#dateObj.toLocaleTimeString(), - }) + JSON.stringify({ dateObj: this.#dateObj.valueOf() }) ); header.append(modificationDate); }