[Libreoffice-commits] online.git: loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Sep 6 08:45:04 UTC 2018
loleaflet/src/layer/marker/Annotation.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit a82c2f440117313787b64598ac312c2c982bbde8
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Thu Sep 6 10:39:03 2018 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Sep 6 10:44:47 2018 +0200
loleaflet: localize annotation/comment date
Change-Id: If29a3a84bc5a3aab31bf4f259345845cd9004467
Reviewed-on: https://gerrit.libreoffice.org/60076
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js
index 219481233..a8ceef119 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -335,7 +335,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: 'long', year: 'numeric', month: 'long', 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