- © {{ new Date().getFullYear() }} Studentenclub Wu 5 e.v.
+ © {{ new Date().getFullYear() }} Studentenclub Wu5 e.V.
+
+
+
+ Impressum
+
+
+ Datenschutzerklärung
+
+
+ Bugs?
+
+
-
+
{{ calcTime }}
+
+ {{ calcTimeLittle }}
+
@@ -23,11 +52,18 @@
Zeit bis zum Logout ändern
-
+
- Abbrechen
+ Abbrechen
Speichern
@@ -152,6 +188,35 @@ export default {
} else {
return minutesString + ':' + secondsString + ' Minuten bis zum Logout'
}
+ },
+ calcTimeLittle() {
+ var minutes = this.lifeTime / 60
+ var seconds = this.lifeTime % 60
+ var minutesString =
+ minutes < 10 ? '0' + Math.floor(minutes % 60) : Math.floor(minutes % 60)
+ var secondsString =
+ seconds < 10 ? '0' + Math.floor(seconds) : Math.floor(seconds)
+ if (minutes > 60) {
+ var hours = minutes / 60
+ if (hours > 24) {
+ var days = hours / 24
+ var now = new Date()
+ var dayMonth = new Date(
+ now.getFullYear(),
+ now.getMonth() + 1,
+ 0
+ ).getDate()
+ if (days >= dayMonth) {
+ return Math.floor(days / dayMonth) + 'M'
+ } else {
+ return Math.floor(days) + 'D'
+ }
+ } else {
+ return Math.floor(hours) + ':' + minutesString + ':' + secondsString
+ }
+ } else {
+ return minutesString + ':' + secondsString
+ }
}
},
beforeDestroy() {