json-calendar
Advanced tools
Comparing version
@@ -0,1 +1,8 @@ | ||
## [1.9.1](https://github.com/rxgx/json-calendar/compare/v1.9.0...v1.9.1) (2020-12-07) | ||
### Bug Fixes | ||
* bump ts-standard and remove json types ([#333](https://github.com/rxgx/json-calendar/issues/333)) ([2801173](https://github.com/rxgx/json-calendar/commit/280117316ce89735b5cdc7c3d35046e97f9554d3)) | ||
# [1.9.0](https://github.com/rxgx/json-calendar/compare/v1.8.20...v1.9.0) (2020-10-13) | ||
@@ -2,0 +9,0 @@ |
@@ -25,16 +25,15 @@ interface CalendarOptions { | ||
} | ||
declare const _default: { | ||
new (userParams?: Partial<CalendarOptions>): { | ||
dayNames: CalendarDayName[]; | ||
monthNames: string[]; | ||
options: CalendarOptions; | ||
today: Date; | ||
weeks: CalendarWeek[]; | ||
buildWeeksArray(): void; | ||
changeMonth(year: number, monthIndex: number): void; | ||
getDayAbbr(index: number): string; | ||
getDayName(index: number): string; | ||
getMonthName(index: number): string; | ||
}; | ||
}; | ||
export = _default; | ||
declare class JsonCalendar { | ||
dayNames: CalendarDayName[]; | ||
monthNames: string[]; | ||
options: CalendarOptions; | ||
today: Date; | ||
weeks: CalendarWeek[]; | ||
constructor(userParams?: Partial<CalendarOptions>); | ||
private buildWeeksArray; | ||
changeMonth(year: number, monthIndex: number): void; | ||
getDayAbbr(index: number): string; | ||
getDayName(index: number): string; | ||
getMonthName(index: number): string; | ||
} | ||
export = JsonCalendar; |
@@ -6,3 +6,3 @@ "use strict"; | ||
const dictionary = require("./dictionary"); | ||
module.exports = class JsonCalendar { | ||
class JsonCalendar { | ||
constructor(userParams = {}) { | ||
@@ -93,2 +93,3 @@ const { today = new Date() } = userParams; | ||
} | ||
}; | ||
} | ||
module.exports = JsonCalendar; |
"use strict"; | ||
module.exports = function isWeekend(date) { | ||
const day = date.getDay(); | ||
return day === 0 || day === 6; | ||
const dayIndex = date.getDay(); | ||
return dayIndex === 0 || dayIndex === 6; | ||
}; |
{ | ||
"name": "json-calendar", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"description": "A data model for displaying dates and date ranges on a calendar interface.", | ||
@@ -45,5 +45,5 @@ "keywords": [ | ||
"prettier": "^2.1.2", | ||
"semantic-release": "^17.1.2", | ||
"semantic-release": "^17.3.0", | ||
"ts-jest": "^26.4.1", | ||
"ts-standard": "^9.0.0", | ||
"ts-standard": "^10.0.0", | ||
"typescript": "^4.0.3" | ||
@@ -50,0 +50,0 @@ }, |
# json-calendar | ||
[](https://codecov.io/gh/rxgx/json-calendar) | ||
[](undefined) | ||
@@ -5,0 +5,0 @@ A JSON data model for displaying dates and date ranges on a calendar interface. |
Sorry, the diff of this file is too big to display
583303
1.61%15781
1.32%