Skip to content

Commit

Permalink
Show Hebrew year in hebdate objects on the 1st of each month
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Oct 29, 2021
1 parent 2c3ec4a commit 98e27ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hebcal/icalendar",
"version": "4.14.1",
"version": "4.14.2",
"author": "Michael J. Radwin (https://github.com/mjradwin)",
"keywords": [
"ical",
Expand All @@ -24,8 +24,8 @@
"url": "https://github.com/hebcal/hebcal-icalendar/issues"
},
"dependencies": {
"@hebcal/core": "^3.26.7",
"@hebcal/rest-api": "^3.8.4"
"@hebcal/core": "^3.27.0",
"@hebcal/rest-api": "^3.8.6"
},
"scripts": {
"build": "rollup -c",
Expand Down
6 changes: 3 additions & 3 deletions src/icalendar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {flags, Locale} from '@hebcal/core';
import {murmur3} from 'murmurhash-js';
import {pad2, pad4, getCalendarTitle, makeAnchor, getEventCategories,
getHolidayDescription, makeTorahMemoText, appendIsraelAndTracking} from '@hebcal/rest-api';
getHolidayDescription, makeTorahMemoText, appendIsraelAndTracking,
shouldRenderBrief} from '@hebcal/rest-api';
import {promises as fs} from 'fs';
import {version} from '../package.json';

Expand Down Expand Up @@ -52,7 +53,6 @@ function appendTrackingToUrl(url, options) {
}

const encoder = new TextEncoder();
const BRIEF_FLAGS = flags.DAF_YOMI | flags.HEBREW_DATE;

/**
* Represents an RFC 2445 iCalendar VEVENT
Expand All @@ -69,7 +69,7 @@ export class IcalEvent {
this.dtstamp = options.dtstamp || IcalEvent.makeDtstamp(new Date());
const timed = this.timed = Boolean(ev.eventTime);
const locale = options.locale;
let subj = timed || (ev.getFlags() & BRIEF_FLAGS) ? ev.renderBrief(locale) : ev.render(locale);
let subj = shouldRenderBrief(ev) ? ev.renderBrief(locale) : ev.render(locale);
const mask = ev.getFlags();
if (ev.locationName) {
this.locationName = ev.locationName;
Expand Down
2 changes: 1 addition & 1 deletion src/icalendar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ test('relcalid', async (t) => {
`X-WR-RELCALID:${relcalid}`,
'BEGIN:VEVENT',
'DTSTAMP:X',
'SUMMARY:1st of Adar',
'SUMMARY:1st of Adar\\, 5781',
'DTSTART;VALUE=DATE:20210213',
'DTEND;VALUE=DATE:20210214',
'UID:X',
Expand Down

0 comments on commit 98e27ca

Please sign in to comment.