mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
Localize date in meal planner
This commit is contained in:
parent
e211c99ecd
commit
f565cfce7a
1 changed files with 3 additions and 10 deletions
|
@ -143,10 +143,10 @@ export default {
|
||||||
return dateDif;
|
return dateDif;
|
||||||
},
|
},
|
||||||
startComputedDateFormatted() {
|
startComputedDateFormatted() {
|
||||||
return this.formatDate(this.startDate);
|
return this.formatDate(this.actualStartDate);
|
||||||
},
|
},
|
||||||
endComputedDateFormatted() {
|
endComputedDateFormatted() {
|
||||||
return this.formatDate(this.endDate);
|
return this.formatDate(this.actualEndDate);
|
||||||
},
|
},
|
||||||
filteredRecipes() {
|
filteredRecipes() {
|
||||||
const recipes = this.items.filter(x => !this.usedRecipes.includes(x));
|
const recipes = this.items.filter(x => !this.usedRecipes.includes(x));
|
||||||
|
@ -214,14 +214,7 @@ export default {
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
if (!date) return null;
|
if (!date) return null;
|
||||||
|
|
||||||
const [year, month, day] = date.split("-");
|
return this.$d(date);
|
||||||
return `${month}/${day}/${year}`;
|
|
||||||
},
|
|
||||||
parseDate(date) {
|
|
||||||
if (!date) return null;
|
|
||||||
|
|
||||||
const [month, day, year] = date.split("/");
|
|
||||||
return `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
|
|
||||||
},
|
},
|
||||||
getNextDayOfTheWeek(dayName, excludeToday = true, refDate = new Date()) {
|
getNextDayOfTheWeek(dayName, excludeToday = true, refDate = new Date()) {
|
||||||
const dayOfWeek = [
|
const dayOfWeek = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue