@hebcal/icalendar 5.0.4 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -8
- package/dist/index.mjs +11 -8
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/icalendar v5.0.
|
|
1
|
+
/*! @hebcal/icalendar v5.0.5 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var core = require('@hebcal/core');
|
|
@@ -7,7 +7,7 @@ var restApi = require('@hebcal/rest-api');
|
|
|
7
7
|
var fs = require('fs');
|
|
8
8
|
|
|
9
9
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10
|
-
const version = '5.0.
|
|
10
|
+
const version = '5.0.5';
|
|
11
11
|
|
|
12
12
|
const vtimezoneCache = new Map();
|
|
13
13
|
const CATEGORY = {
|
|
@@ -86,15 +86,17 @@ class IcalEvent {
|
|
|
86
86
|
if (ev.locationName) {
|
|
87
87
|
this.locationName = ev.locationName;
|
|
88
88
|
} else if (mask & core.flags.DAF_YOMI) {
|
|
89
|
-
this.locationName = core.Locale.gettext('Daf Yomi');
|
|
89
|
+
this.locationName = core.Locale.gettext('Daf Yomi', locale);
|
|
90
90
|
} else if (mask & core.flags.YERUSHALMI_YOMI) {
|
|
91
|
-
this.locationName = core.Locale.gettext('Yerushalmi Yomi');
|
|
91
|
+
this.locationName = core.Locale.gettext('Yerushalmi Yomi', locale);
|
|
92
92
|
} else if (mask & core.flags.NACH_YOMI) {
|
|
93
|
-
this.locationName = core.Locale.gettext('Nach Yomi');
|
|
93
|
+
this.locationName = core.Locale.gettext('Nach Yomi', locale);
|
|
94
94
|
} else if (mask & core.flags.MISHNA_YOMI) {
|
|
95
|
-
this.locationName = core.Locale.gettext('Mishna Yomi');
|
|
95
|
+
this.locationName = core.Locale.gettext('Mishna Yomi', locale);
|
|
96
96
|
} else if (timed && options.location) {
|
|
97
97
|
this.locationName = options.location.getShortName();
|
|
98
|
+
} else if (ev.category) {
|
|
99
|
+
this.locationName = core.Locale.gettext(ev.category, locale);
|
|
98
100
|
}
|
|
99
101
|
const date = IcalEvent.formatYYYYMMDD(ev.getDate().greg());
|
|
100
102
|
this.startDate = this.isoDateOnly = date;
|
|
@@ -360,7 +362,7 @@ const torahMemoCache = new Map();
|
|
|
360
362
|
const HOLIDAY_IGNORE_MASK = core.flags.DAF_YOMI | core.flags.OMER_COUNT |
|
|
361
363
|
core.flags.SHABBAT_MEVARCHIM | core.flags.MOLAD | core.flags.USER_EVENT |
|
|
362
364
|
core.flags.MISHNA_YOMI | core.flags.YERUSHALMI_YOMI | core.flags.NACH_YOMI |
|
|
363
|
-
core.flags.HEBREW_DATE;
|
|
365
|
+
core.flags.HEBREW_DATE | core.flags.DAILY_LEARNING;
|
|
364
366
|
|
|
365
367
|
/**
|
|
366
368
|
* @private
|
|
@@ -456,7 +458,8 @@ async function eventsToIcalendar(events, options) {
|
|
|
456
458
|
*/
|
|
457
459
|
async function icalEventsToString(icals, options) {
|
|
458
460
|
const stream = [];
|
|
459
|
-
const
|
|
461
|
+
const locale = options.locale || core.Locale.getLocaleName();
|
|
462
|
+
const uclang = locale.toUpperCase();
|
|
460
463
|
const opts = Object.assign({}, options);
|
|
461
464
|
opts.dtstamp = opts.dtstamp || IcalEvent.makeDtstamp(new Date());
|
|
462
465
|
const title = opts.title ? IcalEvent.escape(opts.title) : 'Untitled';
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @hebcal/icalendar v5.0.
|
|
1
|
+
/*! @hebcal/icalendar v5.0.5 */
|
|
2
2
|
import { flags, Locale, greg } from '@hebcal/core';
|
|
3
3
|
import { murmur32HexSync } from 'murmurhash3';
|
|
4
4
|
import { shouldRenderBrief, pad2, getEventCategories, makeAnchor, pad4, getHolidayDescription, getCalendarTitle, appendIsraelAndTracking, makeTorahMemoText } from '@hebcal/rest-api';
|
|
5
5
|
import { promises } from 'fs';
|
|
6
6
|
|
|
7
7
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
8
|
-
const version = '5.0.
|
|
8
|
+
const version = '5.0.5';
|
|
9
9
|
|
|
10
10
|
const vtimezoneCache = new Map();
|
|
11
11
|
const CATEGORY = {
|
|
@@ -84,15 +84,17 @@ class IcalEvent {
|
|
|
84
84
|
if (ev.locationName) {
|
|
85
85
|
this.locationName = ev.locationName;
|
|
86
86
|
} else if (mask & flags.DAF_YOMI) {
|
|
87
|
-
this.locationName = Locale.gettext('Daf Yomi');
|
|
87
|
+
this.locationName = Locale.gettext('Daf Yomi', locale);
|
|
88
88
|
} else if (mask & flags.YERUSHALMI_YOMI) {
|
|
89
|
-
this.locationName = Locale.gettext('Yerushalmi Yomi');
|
|
89
|
+
this.locationName = Locale.gettext('Yerushalmi Yomi', locale);
|
|
90
90
|
} else if (mask & flags.NACH_YOMI) {
|
|
91
|
-
this.locationName = Locale.gettext('Nach Yomi');
|
|
91
|
+
this.locationName = Locale.gettext('Nach Yomi', locale);
|
|
92
92
|
} else if (mask & flags.MISHNA_YOMI) {
|
|
93
|
-
this.locationName = Locale.gettext('Mishna Yomi');
|
|
93
|
+
this.locationName = Locale.gettext('Mishna Yomi', locale);
|
|
94
94
|
} else if (timed && options.location) {
|
|
95
95
|
this.locationName = options.location.getShortName();
|
|
96
|
+
} else if (ev.category) {
|
|
97
|
+
this.locationName = Locale.gettext(ev.category, locale);
|
|
96
98
|
}
|
|
97
99
|
const date = IcalEvent.formatYYYYMMDD(ev.getDate().greg());
|
|
98
100
|
this.startDate = this.isoDateOnly = date;
|
|
@@ -358,7 +360,7 @@ const torahMemoCache = new Map();
|
|
|
358
360
|
const HOLIDAY_IGNORE_MASK = flags.DAF_YOMI | flags.OMER_COUNT |
|
|
359
361
|
flags.SHABBAT_MEVARCHIM | flags.MOLAD | flags.USER_EVENT |
|
|
360
362
|
flags.MISHNA_YOMI | flags.YERUSHALMI_YOMI | flags.NACH_YOMI |
|
|
361
|
-
flags.HEBREW_DATE;
|
|
363
|
+
flags.HEBREW_DATE | flags.DAILY_LEARNING;
|
|
362
364
|
|
|
363
365
|
/**
|
|
364
366
|
* @private
|
|
@@ -454,7 +456,8 @@ async function eventsToIcalendar(events, options) {
|
|
|
454
456
|
*/
|
|
455
457
|
async function icalEventsToString(icals, options) {
|
|
456
458
|
const stream = [];
|
|
457
|
-
const
|
|
459
|
+
const locale = options.locale || Locale.getLocaleName();
|
|
460
|
+
const uclang = locale.toUpperCase();
|
|
458
461
|
const opts = Object.assign({}, options);
|
|
459
462
|
opts.dtstamp = opts.dtstamp || IcalEvent.makeDtstamp(new Date());
|
|
460
463
|
const title = opts.title ? IcalEvent.escape(opts.title) : 'Untitled';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/icalendar",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ical",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"url": "https://github.com/hebcal/hebcal-icalendar/issues"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@hebcal/core": "^5.
|
|
34
|
-
"@hebcal/rest-api": "^5.0.
|
|
33
|
+
"@hebcal/core": "^5.2.1",
|
|
34
|
+
"@hebcal/rest-api": "^5.0.3",
|
|
35
35
|
"murmurhash3": "^0.5.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
},
|
|
46
46
|
"license": "BSD-2-Clause",
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@hebcal/learning": "^5.0.
|
|
48
|
+
"@hebcal/learning": "^5.0.6",
|
|
49
49
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
50
50
|
"@rollup/plugin-json": "^6.1.0",
|
|
51
|
-
"ava": "^6.
|
|
51
|
+
"ava": "^6.1.1",
|
|
52
52
|
"eslint": "^8.56.0",
|
|
53
53
|
"eslint-config-google": "^0.14.0",
|
|
54
54
|
"jsdoc": "^4.0.2",
|
|
55
|
-
"jsdoc-to-markdown": "^8.0.
|
|
56
|
-
"rollup": "^4.9.
|
|
55
|
+
"jsdoc-to-markdown": "^8.0.1",
|
|
56
|
+
"rollup": "^4.9.6"
|
|
57
57
|
}
|
|
58
58
|
}
|