Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f7819ed

Browse files
chore: split conditionals
Split block of conditionals in separate lines to improve readability
1 parent 0b66f67 commit f7819ed

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎Dynamic-Programming/FindMonthCalendar.js‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,16 @@ class Month {
5757
}
5858

5959
isGreater (startDate, endDate) {
60-
if (startDate.year > endDate.year) { return true } else if (startDate.year < endDate.year) { return false } else if (startDate.month > endDate.month) { return true } else if (startDate.month < endDate.month) { return false } else return true
60+
if (startDate.year > endDate.year) {
61+
return true
62+
} else if (startDate.year < endDate.year) {
63+
return false
64+
} else if (startDate.month > endDate.month) {
65+
return true
66+
} else if (startDate.month < endDate.month) {
67+
return false
68+
}
69+
return true
6170
}
6271

6372
getDayDiff (startDate, endDate) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /