Swift makes it relatively easy to format numbers as byte counts, with appropriate suffixes to indicate units and generally sensible auto-selection of scale factors. e.g.: 1 kB (in English – results may vary depending on locale) This is just a small subset of Swift’s FormatStyle-based formatting capabilities, with which I have a bit of a… Read more| Wade Tregaskis
I have a bit of a love-hate relationship with Swift’s FormatStyle-based formatting capabilities. 42% (in English – results may vary depending on locale) On the pro side: But the cons are rough: All in all, there’s a reason fuckingformatstyle.com exists (and don’t forget to tip!).| Wade Tregaskis
SwiftUI Documentation continues to be lacking. _(Updated 2024-09-22 to use the new TimeDataSource type)_| Ampersand Softworks
Apple gives us a modern replacement for the magical format strings we pass to DateFormatters, let's talk about the Verbatim Format Style.| Ampersand Softworks
So much power to convert, do math on, and localize the display of your measurement values at your fingertips… yet no one uses it.| Ampersand Softworks
I've released a big update for Fucking FormatStyle/Gosh Darned FormatStyle.| Ampersand Softworks
A full example of adding all of the bells and whistles of ParseableFormatStyle onto your own types, including AttributedString output.| Ampersand Softworks
The other side of the FormatStyle coin, getting our data from strings.| Ampersand Softworks
Guess documenting FormatStyle is my life now| Ampersand Softworks
Apple failed to document it, so I built a whole site for it: fuckingformatstyle.com| Ampersand Softworks