Merge pull request #1195 from umap-project/datetime-version

Display time in datalayer versions list
This commit is contained in:
Yohan Boniface 2023-07-05 21:21:40 +02:00 committed by GitHub
commit 76f69d3172
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -976,7 +976,7 @@ L.U.DataLayer = L.Evented.extend({
buildVersionsFieldset: function (container) { buildVersionsFieldset: function (container) {
const appendVersion = function (data) { const appendVersion = function (data) {
const date = new Date(parseInt(data.at, 10)) const date = new Date(parseInt(data.at, 10))
const content = `${date.toLocaleDateString(L.locale)} (${ const content = `${date.toLocaleString(L.lang)} (${
parseInt(data.size) / 1000 parseInt(data.size) / 1000
}Kb)` }Kb)`
const el = L.DomUtil.create('div', 'umap-datalayer-version', versionsContainer) const el = L.DomUtil.create('div', 'umap-datalayer-version', versionsContainer)