{"repo":"WesSouza/calendar-base","free":true,"listed":false,"github":"https://github.com/WesSouza/calendar-base","clone":"git clone https://github.com/WesSouza/calendar-base.git","description":"Base methods for generating calendars using JavaScript.","language":"TypeScript","stars":385,"topics":["calendar","javascript","calendar-generator","library"],"license":"MIT","category":"productivity","readme_excerpt":"Calendar Base Base methods for generating calendars using JavaScript. Output is ES5 compatible. Installation Usage Check an online example or browse the examples folder for some simple use cases. Date object notation Every returned day or date argument follows this notation: Properties month and weekDay respect JavaScript’s Date.prototype . Only day , month , and year are necessary as input parameters for methods that require a date. Calendar(options) Constructor for a new calendar generator. The object options may have the following properties: - startDate : current selected starting date (default undefined ) - endDate : current selected ending date (default undefined ) - siblingMonths : whether to include the previous and next months’ days before and after the current month when generating a calendar (default false ) - weekNumbers : whether to include the week number on each day - weekStart : day of the week, respects Date.prototype.getDay (default 0 , Sunday) Calendar.diff(dateOne, dateTwo) Returns the difference in days between dateOne and dateTwo as a Number . Calendar.interval(dateOne, dateTwo) Returns the amount of days between dateOne and dateTwo as a Number . Calendar.compare(leftDate, rightDate) Compares two date objects, returns: - -1 if leftDate rightDate Useful for quick comparisons such as sorting an array of dates. Calendar.daysInMonth(year, month) Returns the amount of days in the given month as a Number . Calendar.isLeapYear(year) Returns whether the given ye","default_branch":null,"files":null,"tree":[],"storefront":"/r/WesSouza","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/WesSouza/calendar-base/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}