MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / isGreater

Method isGreater

Dynamic-Programming/FindMonthCalendar.js:58–69  ·  view source on GitHub ↗
(startDate, endDate)

Source from the content-addressed store, hash-verified

56 }
57
58 isGreater(startDate, endDate) {
59 if (startDate.year > endDate.year) {
60 return true
61 } else if (startDate.year < endDate.year) {
62 return false
63 } else if (startDate.month > endDate.month) {
64 return true
65 } else if (startDate.month < endDate.month) {
66 return false
67 }
68 return true
69 }
70
71 getDayDiff(startDate, endDate) {
72 if (this.isGreater(startDate, endDate) === null) {

Callers 2

getDayDiffMethod · 0.95
generateMonthCalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected