feat: add some date settings

This commit is contained in:
David Ralph
2021-03-17 22:33:22 +00:00
parent 04fb389d59
commit b4a1a4bb19
3 changed files with 10 additions and 1 deletions

View File

@@ -56,8 +56,9 @@ export default class DateWidget extends React.PureComponent {
// Full date
const lang = localStorage.getItem('language');
const day = date.toLocaleDateString(lang, { weekday: 'long' });
const nth = (localStorage.getItem('datenth') === 'true') ? dtf.nth(date.getDate()) : date.getDate();
const day = (localStorage.getItem('dayofweek') === 'true') ? date.toLocaleDateString(lang, { weekday: 'long' }) : '';
const month = date.toLocaleDateString(lang, { month: 'long' });
const year = date.getFullYear();