Commit a9323a4a authored by Lasse Overgaard Møldrup's avatar Lasse Overgaard Møldrup
Browse files

Reduce anxiety

parent 840f4420
Pipeline #52213 passed with stage
in 41 seconds
......@@ -15,13 +15,25 @@
</template>
<script>
Date.prototype.addDays = function(days) {
const date = new Date(this.valueOf());
date.setDate(date.getDate() + days);
return date;
}
Date.prototype.toMidnight = function() {
const date = new Date(this.valueOf());
date.setHours(0, 0, 0, 0);
return date;
}
export default {
name: 'Deadlines',
data() {
return {
deadlines: [{ course: "Calculus Beta", name: "Aflevering 1", date: new Date() },
{ course: "Databaser", name: "SQL", date: new Date("10 Apr 2021") },
{ course: "Numerisk Lineær Algebra", name: "Python for dummies", date: new Date("12 Apr 2021") }]
{ course: "Databaser", name: "SQL", date: new Date().addDays(2).toMidnight() },
{ course: "Numerisk Lineær Algebra", name: "Python for dummies", date: new Date().addDays(3).toMidnight() }]
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment