Procházet zdrojové kódy

Fix dates (without time) being rendered as datetimes in public pages (#13034)

master^2
ThibG před 4 roky
committed by GitHub
rodič
revize
c31d61d7f2
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 4AEE18F83AFDEB23
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. +1
    -1
      app/javascript/packs/public.js

+ 1
- 1
app/javascript/packs/public.js Zobrazit soubor

@@ -82,7 +82,7 @@ function main() {
content.textContent = timeAgoString({
formatMessage: ({ id, defaultMessage }, values) => (new IntlMessageFormat(messages[id] || defaultMessage, locale)).format(values),
formatDate: (date, options) => (new Intl.DateTimeFormat(locale, options)).format(date),
}, datetime, now, now.getFullYear());
}, datetime, now, now.getFullYear(), content.getAttribute('datetime').includes('T'));
});

const reactComponents = document.querySelectorAll('[data-component]');


Načítá se…
Zrušit
Uložit