mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
Cleanup clock jsdoc
This commit is contained in:
parent
e489b7101c
commit
90cca28e01
@ -153,8 +153,11 @@ Module.register("clock", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param config
|
* Format the time according to the config
|
||||||
* @param time
|
*
|
||||||
|
* @param {object} config The config of the module
|
||||||
|
* @param {object} time time to format
|
||||||
|
* @returns {string} The formatted time string
|
||||||
*/
|
*/
|
||||||
function formatTime(config, time) {
|
function formatTime(config, time) {
|
||||||
var formatString = hourSymbol + ":mm";
|
var formatString = hourSymbol + ":mm";
|
||||||
@ -163,6 +166,7 @@ Module.register("clock", {
|
|||||||
}
|
}
|
||||||
return moment(time).format(formatString);
|
return moment(time).format(formatString);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.config.showSunTimes) {
|
if (this.config.showSunTimes) {
|
||||||
const sunTimes = SunCalc.getTimes(now, this.config.lat, this.config.lon);
|
const sunTimes = SunCalc.getTimes(now, this.config.lat, this.config.lon);
|
||||||
const isVisible = now.isBetween(sunTimes.sunrise, sunTimes.sunset);
|
const isVisible = now.isBetween(sunTimes.sunrise, sunTimes.sunset);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user