1
0
mirror of https://github.com/dwaxweiler/connector-mobilizon synced 2025-06-05 21:59:25 +02:00

first commit

This commit is contained in:
Daniel Waxweiler
2021-01-08 14:08:40 +01:00
commit 1d7fe7a0a3
28 changed files with 12583 additions and 0 deletions

View File

@ -0,0 +1,24 @@
import { DateTime } from 'luxon';
export class DateTimeWrapper {
constructor(text) {
this.dateTime = DateTime.fromISO(text)
}
getShortDate() {
return this.dateTime.toLocaleString(DateTime.DATE_SHORT)
}
get24Time() {
return this.dateTime.toLocaleString(DateTime.TIME_24_SIMPLE)
}
equalsDate(other) {
return this.dateTime &&
other.dateTime &&
this.dateTime.day === other.dateTime.day &&
this.dateTime.month === other.dateTime.month &&
this.dateTime.year === other.dateTime.year
}
}