diff --git a/l10n/en-US/viewer.ftl b/l10n/en-US/viewer.ftl index 9dcde08c59974a..67b6682cc04274 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-string1 = { DATETIME($dateObj, dateStyle: "short") }, { DATETIME($dateObj, timeStyle: "medium") } # .alt: This is used as a tooltip. # Variables: diff --git a/l10n/sv-SE/viewer.ftl b/l10n/sv-SE/viewer.ftl index 51ee046b6a209f..30fa7f7e9ba3a4 100644 --- a/l10n/sv-SE/viewer.ftl +++ b/l10n/sv-SE/viewer.ftl @@ -264,9 +264,9 @@ pdfjs-rendering-error = Ett fel uppstod vid visning av sidan. ## 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-string1 = { DATETIME($dateObj, dateStyle: "short") }, { DATETIME($dateObj, timeStyle: "medium") } + # .alt: This is used as a tooltip. # Variables: # $type (String) - an annotation type from a list defined in the PDF spec diff --git a/src/display/annotation_layer.js b/src/display/annotation_layer.js index dff737b6ca6d72..201e65332ba77b 100644 --- a/src/display/annotation_layer.js +++ b/src/display/annotation_layer.js @@ -2242,13 +2242,12 @@ class PopupElement { modificationDate.classList.add("popupDate"); modificationDate.setAttribute( "data-l10n-id", - "pdfjs-annotation-date-string" + "pdfjs-annotation-date-string1" ); modificationDate.setAttribute( "data-l10n-args", JSON.stringify({ - date: this.#dateObj.toLocaleDateString(), - time: this.#dateObj.toLocaleTimeString(), + dateObj: this.#dateObj.valueOf(), }) ); header.append(modificationDate);