Acknowledged

Maybe a bug in Toybox.Weather in SDK4.2.1 or higher

I found a weird behavior in Toybox.Weather module.

According to the instruction below, return type of Dailyforecast.highTemperature is Time.Moment.

https://developer.garmin.com/connect-iq/api-docs/Toybox/Weather/DailyForecast.html

On the other hand, lowTemperature is Lang.Number.

In the program, highTemperature works as Time.Moment and

it causes an error for my app.

This occurs from SDK4.2.1 and higer.

I mean highTemperature is regrded as Lang.Number in SDK4.1.7 or lower.

Is this a bug?

Parents Comment Children
  • Yes, there are a couple of things wrong in the doc, like for highTempature it says it returns the low temperature, and for highTemperature it has "as Time.Moment or Null" (where Time.Moment makes zero sense for a high temperature value) and it says 

    "Returns:

    Lang Number -- or null"

    at the end