소스 검색

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

master^2
ThibG 4 년 전
committed by GitHub
부모
커밋
c31d61d7f2
No known key found for this signature in database 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]');


불러오는 중...
취소
저장