swiftlang / swift-foundation

The Foundation project
Apache License 2.0
2.41k stars 160 forks source link

Adding Beaufort as a UnitSpeed #563

Open alpennec opened 6 months ago

alpennec commented 6 months ago

Currently, UnitSpeed offers the following units: milesPerHour, kilometersPerHour, metersPerSecond and knots.

What do you think about adding Beaufort to this list of supported units?

It's a widely used unit for wind and I'm sure it could be really useful for many weather apps. The Apple Weather app supports this unit too (see attachment below).

CleanShot 2024-04-26 at 20 22 03@2x

I filed the feedback #FB13757373 in the Feedback Assistant.

alpennec commented 6 months ago

Well maybe this can't work: it's not possible to convert from a Beaufort to a given speed because a Beaufort is a range of speeds. So only the speed to Beaufort would be possible.