Skip to content

add sun/moon rise/set times#1885

Merged
MichMich merged 5 commits into
MagicMirrorOrg:developfrom
dtreskunov:dtreskunov/sun-and-moon
Jan 18, 2020
Merged

add sun/moon rise/set times#1885
MichMich merged 5 commits into
MagicMirrorOrg:developfrom
dtreskunov:dtreskunov/sun-and-moon

Conversation

@dtreskunov

@dtreskunov dtreskunov commented Jan 18, 2020

Copy link
Copy Markdown
Contributor

Icons become bright when the object is above the horizon. Also shows
time until next sunset/sunrize and percent of moon illumination.

image

@MichMich MichMich merged commit 7b3a594 into MagicMirrorOrg:develop Jan 18, 2020
@ghost

ghost commented Feb 5, 2020

Copy link
Copy Markdown

On old iPad Safari toLocaleString not working
183 const illuminatedFractionString = moonIllumination.fraction.toLocaleString(undefined, {style: 'percent'});
I think better way is:
183 const illuminatedFractionString = moonIllumination.fraction.toFixed(2)*100 + '%';

@dtreskunov

Copy link
Copy Markdown
Contributor Author

@hangorazvan thanks, I'll try to get it fixed soon. Additionally, it appears that moonrise/moonset times are not quite correct...

dtreskunov added a commit to dtreskunov/MagicMirror that referenced this pull request Feb 10, 2020
1. as reported on MagicMirrorOrg#1885,
toLocaleString is not supported on old iPad Safari

2. SunCalc.getMoonTimes returns moonRise/moonSet times for the given date,
so moonRise can be after moonSet. We want to display the most relevant
times, which are today's moonRise and the next moonSet.
dtreskunov added a commit to dtreskunov/MagicMirror that referenced this pull request Feb 10, 2020
1. as reported on MagicMirrorOrg#1885,
toLocaleString is not supported on old iPad Safari

2. SunCalc.getMoonTimes returns moonRise/moonSet times for the given date,
so moonRise can be after moonSet. We want to display the most relevant
times, which are today's moonRise and the next moonSet.
@ghost

ghost commented Feb 15, 2020

Copy link
Copy Markdown

Here another error, on 15 February morning:

WhatsApp Image 2020-02-15 at 20 21 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants