Hello together,
is there a smarter way to do a Christmas Eve countdown? I added the days of the month manually:
using Toybox.Time.Gregorian;
...
function onLayout(dc) {
....
if (now.month == 12) {
if (now.day == 24) {
countdown = 0;
}
if (now.day < 24) {
countdown = 24-now.day;
}
}
if (now.month == 11) {
countdown = 24+30 - now.day;
}
if (now.month == 10) {
countdown = 24+30+31 - now.day;
}
if (now.month == 10) {
countdown = 24+30+31+30 - now.day;
}
....