Fix deprecated date.toLocaleFormat

This commit is contained in:
Yohan Boniface 2018-06-27 22:29:46 +02:00
parent 157d25c995
commit 048c2afcc1

View file

@ -842,7 +842,7 @@ L.U.DataLayer = L.Class.extend({
var appendVersion = function (data) { var appendVersion = function (data) {
var date = new Date(parseInt(data.at, 10)); var date = new Date(parseInt(data.at, 10));
var content = date.toLocaleFormat() + ' (' + parseInt(data.size) / 1000 + 'Kb)'; var content = date.toLocaleDateString(L.locale) + ' (' + parseInt(data.size) / 1000 + 'Kb)';
var el = L.DomUtil.create('div', 'umap-datalayer-version', versionsContainer); var el = L.DomUtil.create('div', 'umap-datalayer-version', versionsContainer);
var a = L.DomUtil.create('a', '', el); var a = L.DomUtil.create('a', '', el);
L.DomUtil.add('span', '', el, content); L.DomUtil.add('span', '', el, content);