add Meteo part
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
const weekDays = ['lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche']
|
||||
|
||||
interface Date {
|
||||
getWeekDay(): string,
|
||||
toSQLDate(): string,
|
||||
}
|
||||
|
||||
Date.prototype.toSQLDate = function (): string {
|
||||
return (new Date(this)).toISOString().split('T')[0]
|
||||
}
|
||||
|
||||
Date.prototype.getWeekDay = function () {
|
||||
const dayIndex = this.getDay() === 0 ? 6 : this.getDay() - 1
|
||||
return weekDays[dayIndex]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user