mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Merge branch 'develop' into develop
This commit is contained in:
commit
98b53b6b3d
@ -17,6 +17,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Added option to truncate the number of vertical lines a calendar item can span if `wrapEvents` is enabled.
|
- Added option to truncate the number of vertical lines a calendar item can span if `wrapEvents` is enabled.
|
||||||
- Added autoLocation options for weather forcast and current weather modules.
|
- Added autoLocation options for weather forcast and current weather modules.
|
||||||
- Added autoTimezone option for the default clock module.
|
- Added autoTimezone option for the default clock module.
|
||||||
|
- Danish translation for "Feels" and "Weeks"
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
- Bumped the Electron dependency to v3.0.13 to support the most recent Raspbian. [#1500](https://github.com/MichMich/MagicMirror/issues/1500)
|
- Bumped the Electron dependency to v3.0.13 to support the most recent Raspbian. [#1500](https://github.com/MichMich/MagicMirror/issues/1500)
|
||||||
@ -29,6 +30,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Fixed compatibility issues caused when modules request different versions of Font Awesome, see issue [#1522](https://github.com/MichMich/MagicMirror/issues/1522). MagicMirror now uses [Font Awesome 5 with v4 shims included for backwards compatibility](https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#shims).
|
- Fixed compatibility issues caused when modules request different versions of Font Awesome, see issue [#1522](https://github.com/MichMich/MagicMirror/issues/1522). MagicMirror now uses [Font Awesome 5 with v4 shims included for backwards compatibility](https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#shims).
|
||||||
- Installation script problems with raspbian
|
- Installation script problems with raspbian
|
||||||
- Calendar: only show repeating count if the event is actually repeating [#1534](https://github.com/MichMich/MagicMirror/pull/1534)
|
- Calendar: only show repeating count if the event is actually repeating [#1534](https://github.com/MichMich/MagicMirror/pull/1534)
|
||||||
|
- Calendar: Fix exdate handling when multiple values are specified (comma separated)
|
||||||
|
|
||||||
### New weather module
|
### New weather module
|
||||||
- Fixed weather forecast table display [#1499](https://github.com/MichMich/MagicMirror/issues/1499).
|
- Fixed weather forecast table display [#1499](https://github.com/MichMich/MagicMirror/issues/1499).
|
||||||
|
76
modules/default/calendar/vendor/ical.js/ical.js
vendored
76
modules/default/calendar/vendor/ical.js/ical.js
vendored
@ -80,16 +80,45 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var addTZ = function(dt, name, params){
|
var addTZ = function(dt, params){
|
||||||
var p = parseParams(params);
|
var p = parseParams(params);
|
||||||
|
|
||||||
if (params && p){
|
if (params && p && dt){
|
||||||
dt[name].tz = p.TZID
|
dt.tz = p.TZID
|
||||||
}
|
}
|
||||||
|
|
||||||
return dt
|
return dt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var parseTimestamp = function(val){
|
||||||
|
//typical RFC date-time format
|
||||||
|
var comps = /^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(Z)?$/.exec(val);
|
||||||
|
if (comps !== null) {
|
||||||
|
if (comps[7] == 'Z'){ // GMT
|
||||||
|
return new Date(Date.UTC(
|
||||||
|
parseInt(comps[1], 10),
|
||||||
|
parseInt(comps[2], 10)-1,
|
||||||
|
parseInt(comps[3], 10),
|
||||||
|
parseInt(comps[4], 10),
|
||||||
|
parseInt(comps[5], 10),
|
||||||
|
parseInt(comps[6], 10 )
|
||||||
|
));
|
||||||
|
// TODO add tz
|
||||||
|
} else {
|
||||||
|
return new Date(
|
||||||
|
parseInt(comps[1], 10),
|
||||||
|
parseInt(comps[2], 10)-1,
|
||||||
|
parseInt(comps[3], 10),
|
||||||
|
parseInt(comps[4], 10),
|
||||||
|
parseInt(comps[5], 10),
|
||||||
|
parseInt(comps[6], 10)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
var dateParam = function(name){
|
var dateParam = function(name){
|
||||||
return function(val, params, curr){
|
return function(val, params, curr){
|
||||||
|
|
||||||
@ -108,37 +137,24 @@
|
|||||||
comps[3]
|
comps[3]
|
||||||
);
|
);
|
||||||
|
|
||||||
return addTZ(curr, name, params);
|
curr[name] = addTZ(curr[name], params);
|
||||||
|
return curr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
curr[name] = []
|
||||||
|
val.split(',').forEach(function(val){
|
||||||
|
var newDate = parseTimestamp(val);
|
||||||
|
curr[name].push(addTZ(newDate, params));
|
||||||
|
});
|
||||||
|
|
||||||
//typical RFC date-time format
|
if (curr[name].length === 0){
|
||||||
var comps = /^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(Z)?$/.exec(val);
|
delete curr[name];
|
||||||
if (comps !== null) {
|
} else if (curr[name].length === 1){
|
||||||
if (comps[7] == 'Z'){ // GMT
|
curr[name] = curr[name][0];
|
||||||
curr[name] = new Date(Date.UTC(
|
|
||||||
parseInt(comps[1], 10),
|
|
||||||
parseInt(comps[2], 10)-1,
|
|
||||||
parseInt(comps[3], 10),
|
|
||||||
parseInt(comps[4], 10),
|
|
||||||
parseInt(comps[5], 10),
|
|
||||||
parseInt(comps[6], 10 )
|
|
||||||
));
|
|
||||||
// TODO add tz
|
|
||||||
} else {
|
|
||||||
curr[name] = new Date(
|
|
||||||
parseInt(comps[1], 10),
|
|
||||||
parseInt(comps[2], 10)-1,
|
|
||||||
parseInt(comps[3], 10),
|
|
||||||
parseInt(comps[4], 10),
|
|
||||||
parseInt(comps[5], 10),
|
|
||||||
parseInt(comps[6], 10)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return addTZ(curr, name, params)
|
return curr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +164,11 @@
|
|||||||
if (date.exdates === undefined) {
|
if (date.exdates === undefined) {
|
||||||
date.exdates = [];
|
date.exdates = [];
|
||||||
}
|
}
|
||||||
|
if (Array.isArray(date.exdate)){
|
||||||
|
date.exdates = date.exdates.concat(date.exdate);
|
||||||
|
} else {
|
||||||
date.exdates.push(date.exdate);
|
date.exdates.push(date.exdate);
|
||||||
|
}
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
"DAYAFTERTOMORROW": "I overmorgen",
|
"DAYAFTERTOMORROW": "I overmorgen",
|
||||||
"RUNNING": "Slutter om",
|
"RUNNING": "Slutter om",
|
||||||
"EMPTY": "Ingen kommende begivenheder.",
|
"EMPTY": "Ingen kommende begivenheder.",
|
||||||
|
"FEELS": "Føles som",
|
||||||
|
"WEEK": "Uge {weekNumber}",
|
||||||
|
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNØ",
|
"NNE": "NNØ",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user