Skip to content
Snippets Groups Projects
Verified Commit 6ca6baf6 authored by magicfelix's avatar magicfelix
Browse files

Fix week end date calculation

parent 71c1ad51
No related branches found
No related tags found
1 merge request!284Draft: Redesign entering of lesson documentation
...@@ -248,8 +248,8 @@ ...@@ -248,8 +248,8 @@
var start_date = new Date(((lesson_date.getDay() || 7) !== 1) ? lesson_date.setHours(-24 * (lesson_date.getDay() - 1)) : lesson_date) var start_date = new Date(((lesson_date.getDay() || 7) !== 1) ? lesson_date.setHours(-24 * (lesson_date.getDay() - 1)) : lesson_date)
} }
let end_date = new Date(start_date) let end_date = new Date(start_date)
end_date.setDate(end_date.getDate() + 7) end_date.setDate(end_date.getDate() + 6)
return $d(start_date, "short") + " - " + $d(end_date, "short") + ", " + this.$root.django.gettext('CW') + " " + item.week return start_date.toLocaleDateString(this.$root.languageCode) + " - " + end_date.toLocaleDateString(this.$root.languageCode) + ", " + this.$root.django.gettext('CW') + " " + item.week
}, },
personalNoteString(personalNote) { personalNoteString(personalNote) {
let personalNoteString = ""; let personalNoteString = "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment