IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

wb-format-date.js 423B

12345678910111213141516171819
  1. //
  2. // Copyright (C) Stanislaw Adaszewski, 2020
  3. // Contact: s.adaszewski@gmail.com
  4. // Website: https://adared.ch/wba
  5. // License: GNU Affero General Public License, Version 3
  6. //
  7. import { h } from 'preact';
  8. function wbFormatDate(dateStr) {
  9. if (!dateStr)
  10. return (
  11. <i>{ String(dateStr) }</i>
  12. );
  13. let date = new Date(dateStr);
  14. return date.toLocaleString();
  15. }
  16. export default wbFormatDate;