@@ -13,7 +13,8 @@ function getLinkAndGuid(ev, il, mainUrl) {
13
13
let guid ;
14
14
const dt = ev . eventTime || ev . getDate ( ) . greg ( ) ;
15
15
const dtStr0 = dt . toISOString ( ) ;
16
- const dtStr = encodeURIComponent ( dtStr0 . substring ( 0 , ev . eventTime ? 19 : 10 ) ) ;
16
+ const timeIdx = dtStr0 . indexOf ( 'T' ) ;
17
+ const dtStr = encodeURIComponent ( dtStr0 . substring ( 0 , ev . eventTime ? timeIdx + 9 : timeIdx ) ) ;
17
18
const url0 = ev . url ( ) ;
18
19
const url = appendIsraelAndTracking ( url0 || mainUrl , il , 'shabbat1c' , 'rss' ) . replace ( / & / g, '&' ) ;
19
20
if ( url0 ) {
@@ -98,7 +99,8 @@ export function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location
98
99
let subj = ev . render ( ) ;
99
100
const evDate = ev . getDate ( ) . greg ( ) ;
100
101
const pubDate = getPubDate ( ev , evPubDate , evDate , lastBuildDate ) ;
101
- const linkGuid = getLinkAndGuid ( ev , location . getIsrael ( ) , mainUrl ) ;
102
+ const il = location ? location . getIsrael ( ) : false ;
103
+ const linkGuid = getLinkAndGuid ( ev , il , mainUrl ) ;
102
104
const link = linkGuid [ 0 ] ;
103
105
const guid = linkGuid [ 1 ] ;
104
106
const description = dayFormat . format ( evDate ) ;
@@ -109,7 +111,7 @@ export function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location
109
111
if ( candles ) {
110
112
const colon = subj . indexOf ( ': ' ) ;
111
113
if ( colon != - 1 ) {
112
- const options = { location, il : location . getIsrael ( ) , locale : Locale . getLocaleName ( ) } ;
114
+ const options = { location, il, locale : Locale . getLocaleName ( ) } ;
113
115
const time = HebrewCalendar . reformatTimeStr ( ev . eventTimeStr , 'pm' , options ) ;
114
116
subj = subj . substring ( 0 , colon ) + ': ' + time ;
115
117
}
0 commit comments