FIX: hide "Next Week" in future-date-input on Sundays (PR #12918)

This wasn’t working as intended because of a mistake in the condition:

opts.day !== 7

Moment.js’ day() function returns 0 for Sunday.

GitHub

is this locale dependant by any chance?

Nope, day() isn’t locale-aware (there is another locale-aware function - weekday()).

ok cool then :+1: thanks

More precisely, if you call day() using the name of weekday it’ll be locale-aware. Day numbers aren’t locale-aware.

moment().day(Number|String); // locale aware when passing String
moment().day(); // Number, isn't locale aware