mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-29 04:29:41 +00:00
Merge pull request #1699 from Hg347/calendar-1696
fixed calendar, issue 1696, ics file start date is not date type
This commit is contained in:
commit
cf2723aafb
@ -33,6 +33,7 @@ Added UK Met Office Datapoint feed as a provider in the default weather module.
|
||||
- Only update clock once per minute when seconds aren't shown
|
||||
|
||||
### Fixed
|
||||
- fixed issue [#1696](https://github.com/MichMich/MagicMirror/issues/1696), some ical files start date to not parse to date type
|
||||
- Allowance HTML5 autoplay-policy (policy is changed from Chrome 66 updates)
|
||||
- Handle SIGTERM messages
|
||||
- Fixes sliceMultiDayEvents so it respects maximumNumberOfDays
|
||||
|
@ -37,12 +37,16 @@ ical.objectHandlers['END'] = function(val, params, curr, stack){
|
||||
}
|
||||
}
|
||||
|
||||
rule += ' DTSTART:' + curr.start.toISOString().replace(/[-:]/g, '');
|
||||
rule = rule.replace(/\.[0-9]{3}/, '');
|
||||
if( typeof (curr.start) === "date") {
|
||||
rule += ' DTSTART:' + curr.start.toISOString().replace(/[-:]/g, '');
|
||||
rule = rule.replace(/\.[0-9]{3}/, '');
|
||||
}
|
||||
}
|
||||
for (var i in curr.exdates) {
|
||||
rule += ' EXDATE:' + curr.exdates[i].toISOString().replace(/[-:]/g, '');
|
||||
rule = rule.replace(/\.[0-9]{3}/, '');
|
||||
if( typeof (curr.exdates[i]) === "date") {
|
||||
rule += ' EXDATE:' + curr.exdates[i].toISOString().replace(/[-:]/g, '');
|
||||
rule = rule.replace(/\.[0-9]{3}/, '');
|
||||
}
|
||||
}
|
||||
try {
|
||||
curr.rrule = rrulestr(rule);
|
||||
|
Loading…
x
Reference in New Issue
Block a user