Made forecast-period conditionCode optional

This commit is contained in:
2026-05-28 07:46:57 -05:00
parent 6ea27cb2c5
commit 626df6bfc1
9 changed files with 111 additions and 60 deletions

View File

@@ -5,6 +5,8 @@ package presenter
import (
"math"
"time"
"gitea.maximumdirect.net/ejr/weatherfeeder/model"
)
func celsiusToFahrenheitPtr(v *float64) *float64 {
@@ -47,6 +49,14 @@ func copyTimePtr(v *time.Time) *time.Time {
return &out
}
func copyWMOCodePtr(v *model.WMOCode) *model.WMOCode {
if v == nil {
return nil
}
out := *v
return &out
}
func inLocationTime(v time.Time, loc *time.Location) time.Time {
if loc == nil {
return v