]> source.dussan.org Git - nextcloud-server.git/commitdiff
Show first day of the week in correct language 17691/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Sat, 26 Oct 2019 12:31:38 +0000 (14:31 +0200)
committerDaniel Kesselberg <mail@danielkesselberg.de>
Sat, 26 Oct 2019 12:31:38 +0000 (14:31 +0200)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
.eslintrc.js
apps/settings/js/settings/personalInfo.js

index b86372955e42a15f043d2ff55340d6475c713bfe..be6da20033a24e2db9970a9ca63f0f09eefe149b 100644 (file)
@@ -6,7 +6,9 @@ module.exports = {
                $: true,
                moment: true,
                escapeHTML: true,
-               oc_userconfig: true
+               oc_userconfig: true,
+               dayNames: true,
+               firstDay: true
        },
        extends: ['nextcloud']
 }
index 454374b303d96fbc0f490293281af45134a77542..9a683b30c00114b063e5ea56f19da56141e91b3a 100644 (file)
@@ -369,11 +369,9 @@ $(document).ready(function () {
 });
 
 window.setInterval(function() {
-       $('#localeexample-time').text(moment().format('LTS'));
-       $('#localeexample-date').text(moment().format('L'));
-       $('#localeexample-fdow').text(t('settings', 'Week starts on {fdow}',
-               {fdow: moment().weekday(0).format('dddd')}));
-
-}, 1000);
+       $('#localeexample-time').text(moment().format('LTS'))
+       $('#localeexample-date').text(moment().format('L'))
+       $('#localeexample-fdow').text(t('settings', 'Week starts on {fdow}', { fdow: dayNames[firstDay] }))
+}, 1000)
 
 OC.Settings.updateAvatar = updateAvatar;