[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 7 11:26:01 UTC 2018
loleaflet/src/layer/marker/Annotation.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 4632c5c7d7b8e06323f957392c472325b092e40a
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Thu Sep 6 10:39:03 2018 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Sep 7 13:25:42 2018 +0200
loleaflet: localize annotation/comment date
Change-Id: If29a3a84bc5a3aab31bf4f259345845cd9004467
Reviewed-on: https://gerrit.libreoffice.org/60077
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js
index 73c4b5604..f95612853 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -334,7 +334,8 @@ L.Annotation = L.Layer.extend({
$(this._authorAvatarImg).attr('src', this._data.avatar);
var d = new Date(this._data.dateTime.replace(/,.*/, 'Z'));
- $(this._contentDate).text((isNaN(d.getTime()) || this._map.getDocType() === 'spreadsheet')? this._data.dateTime: d.toDateString());
+ var dateOptions = { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' };
+ $(this._contentDate).text((isNaN(d.getTime()) || this._map.getDocType() === 'spreadsheet')? this._data.dateTime: d.toLocaleDateString(String.locale, dateOptions));
if (this._data.trackchange) {
$(this._captionText).text(this._data.description);
More information about the Libreoffice-commits
mailing list