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

Method generateMonthCal

Dynamic-Programming/FindMonthCalendar.js:100–113  ·  view source on GitHub ↗
(date)

Source from the content-addressed store, hash-verified

98 }
99
100 generateMonthCal(date) {
101 const Month = this.parseDate(date)
102 let day = ''
103 let difference = this.getDayDiff(this.epoch, Month)
104 difference = difference % 7
105 let Month2 = this.parseDate(date)
106 day = this.isGreater(Month2, this.epoch)
107 ? this.Days[difference]
108 : this.BDays[difference]
109 Month2 = this.parseDate(date)
110 if (isLeapYear(Month2.year))
111 this.printCal(this.monthDaysLeap[Month2.month], day)
112 else this.printCal(this.monthDays[Month2.month], day)
113 }
114}
115
116export { Month }

Callers

nothing calls this directly

Calls 5

parseDateMethod · 0.95
getDayDiffMethod · 0.95
isGreaterMethod · 0.95
printCalMethod · 0.95
isLeapYearFunction · 0.90

Tested by

no test coverage detected