ソースを参照

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

master^2
ThibG 4年前
committed by GitHub
コミット
c31d61d7f2
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 4AEE18F83AFDEB23
1個のファイルの変更1行の追加1行の削除
  1. +1
    -1
      app/javascript/packs/public.js

+ 1
- 1
app/javascript/packs/public.js ファイルの表示

@@ -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]');


読み込み中…
キャンセル
保存