We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f255417 commit fc6c339Copy full SHA for fc6c339
02.calendar/cal.js
@@ -23,10 +23,11 @@ function printCalendar(year, month) {
23
for (let day = firstDay; day <= lastDay; day = day.plus({ days: 1 })) {
24
const formattedDay = day.day.toString().padStart(2);
25
const isLastDay = day.hasSame(lastDay, "day");
26
+ const isSaturday = day.weekday === 6;
27
if (isLastDay) {
28
console.log(formattedDay);
29
console.log();
- } else if (day.weekday === 6) {
30
+ } else if (isSaturday) {
31
32
} else {
33
process.stdout.write(`${formattedDay} `);
0 commit comments