Skip to content

Here’s something new. I occasionally—using [this bit of …

Here’s something new. I occasionally—using this bit of code—fetch (very basic) weather data when I post to this site, and I just saw a temperature, underneath a day-old note, of minus zero degrees Celsius. (Not that that’s incorrect per se, but I’d like to avoid it right here.) The “fix”? Run the (floating point) number through round() first, then number_format().