You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<ahref="https://github.com/WesSouza/calendar-base/actions?query=branch%3Amaster+workflow%3A%22CI%20Tests"><imgsrc="https://github.com/WesSouza/calendar-base/workflows/CI%20Tests/badge.svg"alt="Install, lint, test and build status badge"></a>
4
4
5
-
Base methods for generating calendars using JavaScript.
Only `day`, `month`, and `year` are necessary as input parameters for methods
68
+
that require a date.
52
69
53
70
#### `Calendar(options)`
54
71
55
72
Constructor for a new calendar generator.
56
73
57
74
The object `options` may have the following properties:
58
75
59
-
*`startDate`: current selected starting date (default `undefined`)
60
-
*`endDate`: current selected ending date (default `undefined`)
61
-
*`siblingMonths`: whether to include the previous and next months’ days before and after the current month when generating a calendar (default `false`)
62
-
*`weekNumbers`: whether to include the week number on each day
63
-
*`weekStart`: day of the week, respects [`Date.prototype.getDay`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay) (default `0`, Sunday)
64
-
76
+
-`startDate`: current selected starting date (default `undefined`)
77
+
-`endDate`: current selected ending date (default `undefined`)
78
+
-`siblingMonths`: whether to include the previous and next months’ days before
79
+
and after the current month when generating a calendar (default `false`)
80
+
-`weekNumbers`: whether to include the week number on each day
Returns an `Array` of dates with the days from the given month, always starting at the configured week day.
146
+
Returns an `Array` of dates with the days from the given month, always starting
147
+
at the configured week day.
135
148
136
-
If sibling months is disabled, paddings are added as `false` to align the week days, otherwise the respective days from the previous or next months are included.
149
+
If sibling months is disabled, paddings are added as `false` to align the week
150
+
days, otherwise the respective days from the previous or next months are
151
+
included.
137
152
138
153
```js
139
154
>var cal =newCalendar({ siblingMonths:true });
@@ -145,12 +160,10 @@ If sibling months is disabled, paddings are added as `false` to align the week d
Week numbers are calculated based on the ISO 8601 standard, which assumes calculations based on weeks starting on Mondays. Be extra careful displaying the week number if your calendar doesn't start on a Monday.
185
-
195
+
Week numbers are calculated based on the ISO 8601 standard, which assumes
196
+
calculations based on weeks starting on Mondays. Be extra careful displaying the
197
+
week number if your calendar doesn't start on a Monday.
0 commit comments