Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Commit

Permalink
doc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rudotriton committed Aug 29, 2021
1 parent d11c0b2 commit 535d538
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 2 additions & 4 deletions calendar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// src/settings.ts
var params = JSON.parse(args.widgetParameter) || {};
var settings = {
debug: true,
debug: false,
calendarApp: "calshow",
backgroundImage: params.bg ? params.bg : "transparent.jpg",
widgetBackgroundColor: "#000000",
Expand All @@ -20,7 +20,7 @@ var settings = {
widgetType: params.view ? params.view : "cal",
showAllDayEvents: true,
showCalendarBullet: true,
startWeekOnSunday: true,
startWeekOnSunday: false,
showEventsOnlyForToday: false,
nextNumOfDays: 7,
showCompleteTitle: false,
Expand Down Expand Up @@ -341,8 +341,6 @@ async function buildCalendarView(date, stack, settings2) {
daysFromPrevMonth,
daysFromNextMonth
);
console.log("events");
console.log(eventCounts);
for (let i = 0; i < calendar.length; i += 1) {
const weekdayStack = calendarStack.addStack();
weekdayStack.layoutVertically();
Expand Down
2 changes: 1 addition & 1 deletion src/buildCalendarView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async function buildCalendarView(
align: "center",
});
}
// j == 0, contains the letters, so this creates every other date
// j == 0, contains the letters, so this creates all the other dates
} else if (j > 0 && calendar[i][j] !== " ") {
const toFullSize = isDateFromBoundingMonth(i, j, date, calendar);

Expand Down
4 changes: 3 additions & 1 deletion src/isWeekend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
* If the week starts on a Sunday indeces 0 and 6 are for weekends
* else indices 5 and 6
*
* @name isWeekend
* @function
* @param {number} index
* @param {{startWeekOnSunday: boolean}} settings
* @param {boolean} settings
*/
function isWeekend(index: number, startWeekOnSunday = false): boolean {
if (startWeekOnSunday) {
Expand Down
3 changes: 2 additions & 1 deletion src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const settings: Settings = {
// set to true to initially give Scriptable calendar access
// set to false to open Calendar when script is run - when tapping on the widget
debug: false,
// calshow is the ios calendar app
// what app to open when the script is run in a widget, calshow is the ios
// calendar app
calendarApp: "calshow",
// a separate image can be specified per widget in widget params:
// Long press on widget -> Edit Widget -> Parameter
Expand Down

0 comments on commit 535d538

Please sign in to comment.