0
Clock upgrade
Hi Mikro, need to upgrade the clock to Include Caracas, Venezuela I don't know how include.
In this moment there are -5 Hours different from Madrid / Caracas Madrid 11.00 am Caracas 6.00 am
Thanks
2 Antworten
-
side-by-side -> line 58: grid-template-columns: auto auto;
Mirko
function SunsetAndRise(lat : number,long : number,timezoneValue : number) do let dateNow := now(); let utc := datetime(dateNow) - time(1, 0); let localDate := date(utc + time(timezoneValue, 0)); let localTime := time(utc + time(timezoneValue, 0)); let zeitzone := timezoneValue; let breiteRad := 3.14159 * lat / 180; let dayCount := days(date(year(dateNow), 1, 0), date(year(dateNow), month(dateNow), day(dateNow))); let deklination := 0.4095 * sin(0.016906 * (dayCount - 80.086)); let zeitdifferenz := 12 * acos((sin(-0.0145) - sin(breiteRad) * sin(deklination)) / (cos(breiteRad) * cos(deklination))) / 3.14159; let zeitgleichung := -0.171 * sin(0.0337 * dayCount + 0.465) - 0.1299 * sin(0.01787 * dayCount - 0.168); let sunSet := 12 + zeitdifferenz - zeitgleichung; let sunSetCorr := sunSet - long / 15 + zeitzone; let timeSunSet := time(sunSetCorr, 0); let sunRise := 12 - zeitdifferenz - zeitgleichung; let sunRiseCorr := sunRise - long / 15 + zeitzone; let timeSunRise := time(sunRiseCorr, 0); if text(timeSunRise) < text(localTime) and text(localTime) < text(timeSunSet) then " <text>🌤 </text> " + localDate + " " + format(datetime(today(), localTime), "HH:mm") else " <text>🌗</text> " + localDate + " " + format(datetime(today(), localTime), "HH:mm") end + "<br>" + " ⇑ " + timeSunRise + " ☼ " + timeSunSet + " ⇓" end; function dayLightSavingTimeZoneMez(timeZone : number) do let beginn := last(for i in range(0, 31) do if weekday(date(2023, 3, i)) = 6 then date(2023, 3, i) end end); let ende := last(for i in range(0, 31) do if weekday(date(2023, 10, i)) = 6 then date(2023, 10, i) end end); if date(now()) >= beginn and date(now()) < ende then timeZone + 1 else timeZone end end; let caracas := "Caracas" + "<br>" + SunsetAndRise(10.49, -66.88, -4); let madrid := "Madrid " + "<br>" + SunsetAndRise(40.42, -3.7, dayLightSavingTimeZoneMez(1)); let css := " <style> .grid-container { display: grid; grid-template-columns: auto; grid-gap: 5px; background-color: white; } .box{ text-align:center; border: 1px solid silver; border-radius:.5em } </style> "; let content := " <aside class = 'grid-container'> <aside class = 'box'>" + madrid + "</aside> <aside class = 'box'>" + caracas + "</aside> </aside> "; html(css + content)
-
Thanks
Content aside
- Status Answered
- vor 1 JahrZuletzt aktiv
- 2Antworten
- 22Ansichten
-
2
Folge bereits