loleaflet/src/control/Control.DocumentRepair.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 0ed8e569e2180374c37e9451c4c8398e1e906a69 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Thu Sep 6 15:31:43 2018 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Thu Sep 6 15:33:30 2018 +0200 loleaflet: don't use timeago, because it's hard to localize, use localized timestamps instead Change-Id: Iae5cab6fe7f9b92f9098b66be48278c4fb293002 Reviewed-on: https://gerrit.libreoffice.org/60088 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/src/control/Control.DocumentRepair.js b/loleaflet/src/control/Control.DocumentRepair.js index 9d67e031a..64171515b 100644 --- a/loleaflet/src/control/Control.DocumentRepair.js +++ b/loleaflet/src/control/Control.DocumentRepair.js @@ -2,7 +2,7 @@ /* * L.Control.DocumentRepair. */ -/* global $ _ _UNO */ +/* global _ _UNO */ L.Control.DocumentRepair = L.Control.extend({ options: { position: 'topright' @@ -76,10 +76,11 @@ L.Control.DocumentRepair = L.Control.extend({ // Show relative date by default, absolute one as tooltip. td = L.DomUtil.create('td', '', row); - var relativeDateTime = $.timeago(dateTime.replace(/,.*/, 'Z')); + var d = new Date(dateTime.replace(/,.*/, 'Z')); + var dateOptions = { year: 'numeric', month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' }; var span = document.createElement('span'); span.title = dateTime; - span.appendChild(document.createTextNode(relativeDateTime)); + span.appendChild(document.createTextNode(d.toLocaleDateString(String.locale, dateOptions))); td.appendChild(span); L.DomEvent.on(row, 'click', this._onRowClick, this); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits