Skip to content

Instantly share code, notes, and snippets.

@BoxOfSnoo
BoxOfSnoo / Anniversaries
Created March 8, 2021 00:44
Anniversaries
// Anniversaries v1.1 Jan 2019
let currentMonth = new Date().getMonth();
let startDate = new Date(new Date().setMonth(currentMonth-6));
// Add two months from today to show some upcoming anniversaries
let endDate = new Date(new Date().setMonth(currentMonth+7));
// Add a convenience function for brief month names
Date.prototype.getMonthName = function() {
@BoxOfSnoo
BoxOfSnoo / JWLib Link.js
Last active October 24, 2020 19:25
Create JW Lib Scripture link
let dailyText = await loadText()
if (config.runsInWidget) {
let widget = createWidget(dailyText)
Script.setWidget(widget)
Script.complete()
} else {
Safari.open(dailyText.wtlibUrl);
}