{"id":"3e2c6536-eaa8-4e81-9bef-a108a2aae8a6","shortId":"73TxQZ","kind":"skill","title":"swift-formatstyle","tagline":"Format values for display using the FormatStyle protocol and its concrete types. Use when formatting numbers (integers, floating-point, decimals), currencies, percentages, dates, date ranges, relative dates, durations (Duration.TimeFormatStyle, Duration.UnitsFormatStyle), measure","description":"# Swift FormatStyle\n\nFormat values for human-readable display using the `FormatStyle` protocol\nand Foundation's concrete format styles. Replaces legacy `Formatter` subclasses\nwith a type-safe, composable, cacheable API.\n\nDocs: [FormatStyle](https://sosumi.ai/documentation/foundation/formatstyle)\n\n## Contents\n\n- [Quick Reference](#quick-reference)\n- [Numbers](#numbers)\n- [Currency](#currency)\n- [Percentages](#percentages)\n- [Dates](#dates)\n- [Durations](#durations)\n- [Measurements](#measurements)\n- [Person Names](#person-names)\n- [Lists](#lists)\n- [Byte Counts](#byte-counts)\n- [URLs](#urls)\n- [SwiftUI Integration](#swiftui-integration)\n- [Custom FormatStyle](#custom-formatstyle)\n- [Common Mistakes](#common-mistakes)\n- [Review Checklist](#review-checklist)\n\n## Quick Reference\n\n| Type | Style Access | Example |\n|------|-------------|---------|\n| `Int`, `Double` | `.number` | `42.formatted(.number.precision(.fractionLength(2)))` → `\"42.00\"` |\n| Currency | `.currency(code:)` | `29.99.formatted(.currency(code: \"USD\"))` → `\"$29.99\"` |\n| Percent | `.percent` | `0.85.formatted(.percent)` → `\"85%\"` |\n| `Date` | `.dateTime` | `Date.now.formatted(.dateTime.month().day().year())` |\n| Date range | `.interval` | `(date1..<date2).formatted(.interval)` |\n| Relative date | `.relative(presentation:unitsStyle:)` | `date.formatted(.relative(presentation: .named))` → `\"yesterday\"` |\n| `Duration` | `.time(pattern:)` | `Duration.seconds(3661).formatted(.time(pattern: .hourMinuteSecond))` → `\"1:01:01\"` |\n| `Duration` | `.units(allowed:width:)` | `Duration.seconds(90).formatted(.units(allowed: [.minutes, .seconds]))` → `\"1 min, 30 sec\"` |\n| `Measurement` | `.measurement(width:)` | `Measurement(value: 72, unit: UnitTemperature.fahrenheit).formatted(.measurement(width: .abbreviated))` |\n| `PersonNameComponents` | `.name(style:)` | `name.formatted(.name(style: .short))` → `\"Tom\"` |\n| `[String]` | `.list(type:width:)` | `[\"A\",\"B\",\"C\"].formatted(.list(type: .and))` → `\"A, B, and C\"` |\n| Byte count | `.byteCount(style:)` | `Int64(1_048_576).formatted(.byteCount(style: .memory))` → `\"1 MB\"` |\n| `URL` | `.url` | `url.formatted(.url.scheme(.never).host().path())` |\n\n## Numbers\n\n```swift\n// Default locale-aware formatting\nlet n = 1234567.formatted()  // \"1,234,567\" (en_US)\n\n// Precision\n1234.5.formatted(.number.precision(.fractionLength(0...2)))  // \"1,234.5\"\n1234.5.formatted(.number.precision(.significantDigits(3)))    // \"1,230\"\n\n// Rounding\n1234.formatted(.number.rounded(rule: .down, increment: 100)) // \"1,200\"\n\n// Grouping\n1234567.formatted(.number.grouping(.never))                   // \"1234567\"\n\n// Notation\n1_200_000.formatted(.number.notation(.compactName))           // \"1.2M\"\n42.formatted(.number.notation(.scientific))                    // \"4.2E1\"\n\n// Sign display\n(-42).formatted(.number.sign(strategy: .always()))            // \"+42\" / \"-42\"\n\n// Locale override\n42.formatted(.number.locale(Locale(identifier: \"de_DE\")))     // \"42\"\n```\n\nDocs: [IntegerFormatStyle](https://sosumi.ai/documentation/foundation/integerformatstyle),\n[FloatingPointFormatStyle](https://sosumi.ai/documentation/foundation/floatingpointformatstyle)\n\n## Currency\n\n```swift\n29.99.formatted(.currency(code: \"USD\"))   // \"$29.99\"\n29.99.formatted(.currency(code: \"EUR\"))   // \"€29.99\"\n29.99.formatted(.currency(code: \"JPY\"))   // \"¥30\"\n\n// Customize precision\nlet style = FloatingPointFormatStyle<Double>.Currency(code: \"USD\")\n    .precision(.fractionLength(0))\n1234.56.formatted(style)  // \"$1,235\"\n```\n\n## Percentages\n\n```swift\n0.85.formatted(.percent)                                      // \"85%\"\n0.8567.formatted(.percent.precision(.fractionLength(1)))       // \"85.7%\"\n42.formatted(.percent)                                         // \"42%\"  (integer)\n```\n\n## Dates\n\n```swift\nlet now = Date.now\n\n// Components\nnow.formatted(.dateTime.year().month().day())           // \"Apr 22, 2026\"\nnow.formatted(.dateTime.hour().minute())                // \"4:30 PM\"\nnow.formatted(.dateTime.weekday(.wide).month(.wide).day()) // \"Wednesday, April 22\"\n\n// Predefined styles\nnow.formatted(date: .long, time: .shortened)            // \"April 22, 2026 at 4:30 PM\"\nnow.formatted(date: .abbreviated, time: .omitted)       // \"Apr 22, 2026\"\n\n// ISO 8601\nnow.formatted(.iso8601)                                 // \"2026-04-22T16:30:00Z\"\n\n// Relative\nlet yesterday = Calendar.current.date(byAdding: .day, value: -1, to: .now)!\nyesterday.formatted(.relative(presentation: .named))    // \"yesterday\"\nyesterday.formatted(.relative(presentation: .numeric))  // \"1 day ago\"\n\n// Interval\n(date1..<date2).formatted(.interval.month().day().hour().minute())\n\n// Components (countdown-style)\n(date1..<date2).formatted(.components(style: .wide, fields: [.day, .hour]))\n// \"2 days, 5 hours\"\n```\n\nDocs: [Date.FormatStyle](https://sosumi.ai/documentation/foundation/date/formatstyle),\n[Date.RelativeFormatStyle](https://sosumi.ai/documentation/foundation/date/relativeformatstyle),\n[Date.IntervalFormatStyle](https://sosumi.ai/documentation/foundation/date/intervalformatstyle)\n\n### Anchored Relative Dates (iOS 18+)\n\n`Date.AnchoredRelativeFormatStyle` formats relative to a fixed anchor date\nrather than the current moment.\n\nDocs: [Date.AnchoredRelativeFormatStyle](https://sosumi.ai/documentation/foundation/date/anchoredrelativeformatstyle)\n\n## Durations\n\n`Duration` (iOS 16+) has two format styles:\n\nDocs: [Duration.TimeFormatStyle](https://sosumi.ai/documentation/swift/duration/timeformatstyle),\n[Duration.UnitsFormatStyle](https://sosumi.ai/documentation/swift/duration/unitsformatstyle)\n\n### TimeFormatStyle — compact separator-based\n\n```swift\nlet d = Duration.seconds(3661)\n\nd.formatted(.time(pattern: .hourMinuteSecond))       // \"1:01:01\"\nd.formatted(.time(pattern: .hourMinute))             // \"1:01\"\nd.formatted(.time(pattern: .minuteSecond))           // \"61:01\"\n\n// Fractional seconds\nDuration.seconds(3.75).formatted(\n    .time(pattern: .minuteSecond(padMinuteToLength: 2, fractionalSecondsLength: 2))\n)  // \"00:03.75\"\n```\n\n### UnitsFormatStyle — labeled units\n\n```swift\nDuration.seconds(3661).formatted(\n    .units(allowed: [.hours, .minutes, .seconds], width: .abbreviated)\n)  // \"1 hr, 1 min, 1 sec\"\n\nDuration.seconds(90).formatted(\n    .units(allowed: [.minutes, .seconds], width: .wide)\n)  // \"1 minute, 30 seconds\"\n\nDuration.seconds(90).formatted(\n    .units(allowed: [.minutes, .seconds], width: .narrow)\n)  // \"1m 30s\"\n\n// Limit unit count\nDuration.seconds(3661).formatted(\n    .units(allowed: [.hours, .minutes, .seconds], width: .abbreviated, maximumUnitCount: 2)\n)  // \"1 hr, 1 min\"\n```\n\n## Measurements\n\n```swift\nlet temp = Measurement(value: 72, unit: UnitTemperature.fahrenheit)\ntemp.formatted(.measurement(width: .wide))        // \"72 degrees Fahrenheit\"\ntemp.formatted(.measurement(width: .abbreviated))  // \"72°F\"\ntemp.formatted(.measurement(width: .narrow))       // \"72°\"\n\nlet dist = Measurement(value: 5, unit: UnitLength.kilometers)\ndist.formatted(.measurement(width: .abbreviated, usage: .road))  // \"3.1 mi\" (en_US)\n```\n\nDocs: [Measurement.FormatStyle](https://sosumi.ai/documentation/foundation/measurement/formatstyle)\n\n## Person Names\n\n```swift\nvar name = PersonNameComponents()\nname.givenName = \"Thomas\"\nname.familyName = \"Clark\"\nname.middleName = \"Louis\"\nname.namePrefix = \"Dr.\"\nname.nickname = \"Tom\"\nname.nameSuffix = \"Esq.\"\n\nname.formatted(.name(style: .long))        // \"Dr. Thomas Louis Clark Esq.\"\nname.formatted(.name(style: .medium))      // \"Thomas Clark\"\nname.formatted(.name(style: .short))       // \"Tom\"\nname.formatted(.name(style: .abbreviated)) // \"TC\"\n```\n\nStyle resolution follows priority: script → user preferences → locale → developer setting.\n\nDocs: [PersonNameComponents.FormatStyle](https://sosumi.ai/documentation/foundation/personnamecomponents/formatstyle)\n\n## Lists\n\n```swift\n[\"Alice\", \"Bob\", \"Charlie\"].formatted(.list(type: .and))\n// \"Alice, Bob, and Charlie\"\n\n[\"Alice\", \"Bob\", \"Charlie\"].formatted(.list(type: .or))\n// \"Alice, Bob, or Charlie\"\n\n// With member formatting\n[1, 2, 3].formatted(.list(memberStyle: .number, type: .and))\n// \"1, 2, and 3\"\n\n// Narrow width\n[\"A\", \"B\", \"C\"].formatted(.list(type: .and, width: .narrow))\n// \"A, B, C\"\n```\n\nDocs: [ListFormatStyle](https://sosumi.ai/documentation/foundation/listformatstyle)\n\n## Byte Counts\n\n```swift\nInt64(1_048_576).formatted(.byteCount(style: .memory))   // \"1 MB\"\nInt64(1_048_576).formatted(.byteCount(style: .file))      // \"1 MB\"\nInt64(1_048_576).formatted(.byteCount(style: .binary))    // \"1 MiB\"\n```\n\nDocs: [ByteCountFormatStyle](https://sosumi.ai/documentation/foundation/bytecountformatstyle)\n\n## URLs\n\n```swift\nlet url = URL(string: \"https://example.com/path?q=1\")!\nurl.formatted()\n// \"https://example.com/path?q=1\"\n\nurl.formatted(.url.scheme(.never).host().path())\n// \"example.com/path\"\n\nurl.formatted(.url.scheme(.always).host(.never).path())\n// \"https:///path\"\n```\n\nDocs: [URL.FormatStyle](https://sosumi.ai/documentation/foundation/url/formatstyle)\n\n## SwiftUI Integration\n\n`Text` accepts a `format:` parameter, keeping formatting out of the view model.\n\n```swift\n// Inline format style\nText(price, format: .currency(code: \"USD\"))\nText(date, format: .dateTime.month().day().year())\nText(duration, format: .units(allowed: [.minutes, .seconds]))\n\n// Timer-style (live updating)\nText(.now, style: .timer)\nText(.now, style: .relative)\nText(timerInterval: start...end)\n```\n\n**Prefer `Text(_:format:)` over string interpolation** — it allows SwiftUI to\nre-render only the formatted value and supports accessibility scaling.\n\n## Custom FormatStyle\n\nConform to `FormatStyle` for domain-specific formatting. Conform to\n`ParseableFormatStyle` if you also need parsing.\n\n```swift\nstruct AbbreviatedCountStyle: FormatStyle {\n    func format(_ value: Int) -> String {\n        switch value {\n        case ..<1_000:\n            return \"\\(value)\"\n        case 1_000..<1_000_000:\n            return String(format: \"%.1fK\", Double(value) / 1_000)\n        default:\n            return String(format: \"%.1fM\", Double(value) / 1_000_000)\n        }\n    }\n}\n\nextension FormatStyle where Self == AbbreviatedCountStyle {\n    static var abbreviatedCount: AbbreviatedCountStyle { .init() }\n}\n\n// Usage\nlet followers = 12_500\nText(followers, format: .abbreviatedCount)  // \"12.5K\"\n```\n\n## Common Mistakes\n\n| Mistake | Fix |\n|---------|-----|\n| Using legacy `NumberFormatter` / `DateFormatter` in new code | Use `FormatStyle` (iOS 15+). Foundation caches format style instances automatically. |\n| String interpolation for formatted numbers in `Text` | Use `Text(value, format:)` for locale correctness and accessibility |\n| Hardcoding locale in format styles | Omit `.locale()` to inherit the user's current locale by default |\n| Using `.time(pattern:)` for labeled duration display | Use `.units(allowed:width:)` for \"1 hr, 30 min\" style output |\n| Creating `Formatter` instances in `body` or tight loops | FormatStyle instances are value types cached by Foundation; safe to create inline |\n| Formatting `Duration` with `DateComponentsFormatter` | Use `Duration.TimeFormatStyle` or `Duration.UnitsFormatStyle` directly |\n| Ignoring `usage:` parameter for measurements | Specify `.road`, `.asProvided`, etc. for locale-aware unit conversion |\n\n## Review Checklist\n\n- [ ] `FormatStyle` used instead of legacy `Formatter` subclasses for iOS 15+ targets\n- [ ] `Text(_:format:)` used instead of pre-formatting strings for SwiftUI text\n- [ ] No hardcoded locale unless explicitly needed (e.g., server communication)\n- [ ] Duration formatting uses `Duration.TimeFormatStyle` or `Duration.UnitsFormatStyle`\n- [ ] Currency codes are ISO 4217 strings, not hardcoded symbols\n- [ ] Measurement formatting includes `usage:` for user-facing display\n- [ ] Custom FormatStyle types conform to `Codable` + `Hashable` for caching\n\n## References\n\n- Apple docs: [FormatStyle](https://sosumi.ai/documentation/foundation/formatstyle) | [Date.FormatStyle](https://sosumi.ai/documentation/foundation/date/formatstyle) | [Duration.TimeFormatStyle](https://sosumi.ai/documentation/swift/duration/timeformatstyle)","tags":["swift","formatstyle","ios","skills","dpearson2699","accessibility","agent-skills","ai-coding","apple","claude-code","codex-skills","cursor-skills"],"capabilities":["skill","source-dpearson2699","skill-swift-formatstyle","topic-accessibility","topic-agent-skills","topic-ai-coding","topic-apple","topic-claude-code","topic-codex-skills","topic-cursor-skills","topic-ios","topic-ios-development","topic-liquid-glass","topic-localization","topic-mapkit"],"categories":["swift-ios-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/dpearson2699/swift-ios-skills/swift-formatstyle","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add dpearson2699/swift-ios-skills","source_repo":"https://github.com/dpearson2699/swift-ios-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 599 github stars · SKILL.md body (12,064 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:53:44.975Z","embedding":null,"createdAt":"2026-04-23T00:53:25.988Z","updatedAt":"2026-05-18T18:53:44.975Z","lastSeenAt":"2026-05-18T18:53:44.975Z","tsv":"'+42':317 '-04':438 '-1':450 '-22':439 '-42':312,318 '/documentation/foundation/bytecountformatstyle)':852 '/documentation/foundation/date/anchoredrelativeformatstyle)':525 '/documentation/foundation/date/formatstyle)':1232 '/documentation/foundation/date/formatstyle),':494 '/documentation/foundation/date/intervalformatstyle)':502 '/documentation/foundation/date/relativeformatstyle),':498 '/documentation/foundation/floatingpointformatstyle)':336 '/documentation/foundation/formatstyle)':71,1228 '/documentation/foundation/integerformatstyle),':332 '/documentation/foundation/listformatstyle)':814 '/documentation/foundation/measurement/formatstyle)':697 '/documentation/foundation/personnamecomponents/formatstyle)':755 '/documentation/foundation/url/formatstyle)':885 '/documentation/swift/duration/timeformatstyle)':1236 '/documentation/swift/duration/timeformatstyle),':538 '/documentation/swift/duration/unitsformatstyle)':542 '/path':873,880 '/path?q=1':861,865 '0':276,364 '0.85.formatted':148,371 '0.8567.formatted':374 '00':584 '000':992,997,999,1000,1008,1017,1018 '00z':442 '01':184,185,558,559,565,571 '03.75':585 '048':242,820,830,840 '1':183,197,241,248,267,278,284,293,367,377,462,557,564,600,602,604,615,645,647,783,792,819,826,829,836,839,846,991,996,998,1007,1016,1105 '1.2':304 '100':292 '12':1032 '12.5':1038 '1234.5.formatted':273,280 '1234.56.formatted':365 '1234.formatted':287 '1234567':299 '1234567.formatted':266,296 '15':1054,1166 '16':529 '18':507 '1_200_000.formatted':301 '1fk':1004 '1fm':1013 '1m':628 '2':136,277,486,581,583,644,784,793 '200':294 '2026':395,420,432,437 '22':394,410,419,431 '230':285 '234':268 '234.5':279 '235':368 '29.99':145,343,348 '29.99.formatted':141,339,344,349 '3':283,785,795 '3.1':689 '3.75':575 '30':199,353,400,423,441,617,1107 '30s':629 '3661':178,552,591,634 '4':399,422 '4.2e1':309 '42':327,381 '42.00':137 '42.formatted':133,306,321,379 '4217':1199 '5':488,680 '500':1033 '567':269 '576':243,821,831,841 '61':570 '72':206,655,662,669,675 '85':150,373 '85.7':378 '8601':434 '90':191,607,620 'abbrevi':212,427,599,642,668,686,739 'abbreviatedcount':1026,1037 'abbreviatedcountstyl':981,1023,1027 'accept':889 'access':128,959,1076 'ago':464 'alic':758,765,769,776 'allow':188,194,594,610,623,637,920,947,1102 'also':976 'alway':316,876 'anchor':503,514 'api':66 'appl':1223 'apr':393,430 'april':409,418 'asprovid':1147 'automat':1060 'awar':262,1152 'b':226,233,799,808 'base':547 'binari':845 'bob':759,766,770,777 'bodi':1115 'byad':447 'byte':97,100,236,815 'byte-count':99 'bytecount':238,245,823,833,843 'bytecountformatstyl':849 'c':227,235,800,809 'cach':1056,1124,1221 'cacheabl':65 'calendar.current.date':446 'case':990,995 'charli':760,768,771,779 'checklist':120,123,1156 'clark':707,723,730 'codabl':1218 'code':140,143,341,346,351,360,908,1050,1196 'common':114,117,1040 'common-mistak':116 'communic':1188 'compact':544 'compactnam':303 'compon':388,473,480 'compos':64 'concret':14,52 'conform':963,971,1216 'content':72 'convers':1154 'correct':1074 'count':98,101,237,632,816 'countdown':475 'countdown-styl':474 'creat':1111,1129 'currenc':25,80,81,138,139,142,337,340,345,350,359,907,1195 'current':519,1089 'custom':109,112,354,961,1213 'custom-formatstyl':111 'd':550 'd.formatted':553,560,566 'date':27,28,31,84,85,151,157,165,383,414,426,505,515,911 'date.anchoredrelativeformatstyle':508,522 'date.formatstyle':491,1229 'date.formatted':169 'date.intervalformatstyle':499 'date.now':387 'date.now.formatted':153 'date.relativeformatstyle':495 'date1':160,466,477 'date2':161,467,478 'datecomponentsformatt':1134 'dateformatt':1047 'datetim':152 'datetime.hour':397 'datetime.month':154,913 'datetime.weekday':403 'datetime.year':390 'day':155,392,407,448,463,470,484,487,914 'de':325,326 'decim':24 'default':259,1009,1092 'degre':663 'develop':749 'direct':1139 'display':7,44,311,1099,1212 'dist':677 'dist.formatted':683 'doc':67,328,490,521,534,693,751,810,848,881,1224 'domain':968 'domain-specif':967 'doubl':131,1005,1014 'dr':711,720 'durat':32,86,87,174,186,526,527,917,1098,1132,1189 'duration.seconds':177,190,551,574,590,606,619,633 'duration.timeformatstyle':33,535,1136,1192,1233 'duration.unitsformatstyle':34,539,1138,1194 'e.g':1186 'en':270,691 'end':939 'esq':715,724 'etc':1148 'eur':347 'exampl':129 'example.com':860,864,872 'example.com/path':871 'example.com/path?q=1':859,863 'explicit':1184 'extens':1019 'f':670 'face':1211 'fahrenheit':664 'field':483 'file':835 'fix':513,1043 'float':22 'floating-point':21 'floatingpointformatstyl':333,358 'follow':743,1031,1035 'format':4,18,38,53,162,179,192,209,228,244,263,313,468,479,509,532,576,592,608,621,635,761,772,782,786,801,822,832,842,891,894,902,906,912,918,942,955,970,984,1003,1012,1036,1057,1064,1071,1080,1131,1169,1175,1190,1205 'formatstyl':3,10,37,47,68,110,113,962,965,982,1020,1052,1119,1157,1214,1225 'formatt':57,1112,1162 'foundat':50,1055,1126 'fraction':572 'fractionalsecondslength':582 'fractionlength':135,275,363,376 'func':983 'group':295 'hardcod':1077,1181,1202 'hashabl':1219 'host':255,869,877 'hour':471,485,489,595,638 'hourminut':563 'hourminutesecond':182,556 'hr':601,646,1106 'human':42 'human-read':41 'identifi':324 'ignor':1140 'includ':1206 'increment':291 'inherit':1085 'init':1028 'inlin':901,1130 'instanc':1059,1113,1120 'instead':1159,1171 'int':130,986 'int64':240,818,828,838 'integ':20,382 'integerformatstyl':329 'integr':105,108,887 'interpol':945,1062 'interv':159,163,465 'interval.month':469 'io':506,528,1053,1165 'iso':433,1198 'iso8601':436 'jpi':352 'k':1039 'keep':893 'label':587,1097 'legaci':56,1045,1161 'let':264,356,385,444,549,651,676,855,1030 'limit':630 'list':95,96,222,229,756,762,773,787,802 'listformatstyl':811 'live':926 'local':261,319,323,748,1073,1078,1083,1090,1151,1182 'locale-awar':260,1150 'long':415,719 'loop':1118 'loui':709,722 'm':305 'maximumunitcount':643 'mb':249,827,837 'measur':35,88,89,201,202,204,210,649,653,659,666,672,678,684,1144,1204 'measurement.formatstyle':694 'medium':728 'member':781 'memberstyl':788 'memori':247,825 'mi':690 'mib':847 'min':198,603,648,1108 'minut':195,398,472,596,611,616,624,639,921 'minutesecond':569,579 'mistak':115,118,1041,1042 'model':899 'moment':520 'month':391,405 'n':265 'name':91,94,172,214,217,456,699,702,717,726,732,737 'name.familyname':706 'name.formatted':216,716,725,731,736 'name.givenname':704 'name.middlename':708 'name.nameprefix':710 'name.namesuffix':714 'name.nickname':712 'narrow':627,674,796,806 'need':977,1185 'never':254,298,868,878 'new':1049 'notat':300 'now.formatted':389,396,402,413,425,435 'number':19,78,79,132,257,789,1065 'number.grouping':297 'number.locale':322 'number.notation':302,307 'number.precision':134,274,281 'number.rounded':288 'number.sign':314 'numberformatt':1046 'numer':461 'omit':429,1082 'output':1110 'overrid':320 'padminutetolength':580 'paramet':892,1142 'pars':978 'parseableformatstyl':973 'path':256,870,879 'pattern':176,181,555,562,568,578,1095 'percent':146,147,149,372,380 'percent.precision':375 'percentag':26,82,83,369 'person':90,93,698 'person-nam':92 'personnamecompon':213,703 'personnamecomponents.formatstyle':752 'pm':401,424 'point':23 'pre':1174 'pre-format':1173 'precis':272,355,362 'predefin':411 'prefer':747,940 'present':167,171,455,460 'price':905 'prioriti':744 'protocol':11,48 'quick':73,76,124 'quick-refer':75 'rang':29,158 'rather':516 're':951 're-rend':950 'readabl':43 'refer':74,77,125,1222 'relat':30,164,166,170,443,454,459,504,510,935 'render':952 'replac':55 'resolut':742 'return':993,1001,1010 'review':119,122,1155 'review-checklist':121 'road':688,1146 'round':286 'rule':289 'safe':63,1127 'scale':960 'scientif':308 'script':745 'sec':200,605 'second':196,573,597,612,618,625,640,922 'self':1022 'separ':546 'separator-bas':545 'server':1187 'set':750 'short':219,734 'shorten':417 'sign':310 'significantdigit':282 'skill' 'skill-swift-formatstyle' 'sosumi.ai':70,331,335,493,497,501,524,537,541,696,754,813,851,884,1227,1231,1235 'sosumi.ai/documentation/foundation/bytecountformatstyle)':850 'sosumi.ai/documentation/foundation/date/anchoredrelativeformatstyle)':523 'sosumi.ai/documentation/foundation/date/formatstyle)':1230 'sosumi.ai/documentation/foundation/date/formatstyle),':492 'sosumi.ai/documentation/foundation/date/intervalformatstyle)':500 'sosumi.ai/documentation/foundation/date/relativeformatstyle),':496 'sosumi.ai/documentation/foundation/floatingpointformatstyle)':334 'sosumi.ai/documentation/foundation/formatstyle)':69,1226 'sosumi.ai/documentation/foundation/integerformatstyle),':330 'sosumi.ai/documentation/foundation/listformatstyle)':812 'sosumi.ai/documentation/foundation/measurement/formatstyle)':695 'sosumi.ai/documentation/foundation/personnamecomponents/formatstyle)':753 'sosumi.ai/documentation/foundation/url/formatstyle)':883 'sosumi.ai/documentation/swift/duration/timeformatstyle)':1234 'sosumi.ai/documentation/swift/duration/timeformatstyle),':536 'sosumi.ai/documentation/swift/duration/unitsformatstyle)':540 'source-dpearson2699' 'specif':969 'specifi':1145 'start':938 'static':1024 'strategi':315 'string':221,858,944,987,1002,1011,1061,1176,1200 'struct':980 'style':54,127,215,218,239,246,357,366,412,476,481,533,718,727,733,738,741,824,834,844,903,925,930,934,1058,1081,1109 'subclass':58,1163 'support':958 'swift':2,36,258,338,370,384,548,589,650,700,757,817,854,900,979 'swift-formatstyl':1 'swiftui':104,107,886,948,1178 'swiftui-integr':106 'switch':988 'symbol':1203 't16':440 'target':1167 'tc':740 'temp':652 'temp.formatted':658,665,671 'text':888,904,910,916,928,932,936,941,1034,1067,1069,1168,1179 'thoma':705,721,729 'tight':1117 'time':175,180,416,428,554,561,567,577,1094 'timeformatstyl':543 'timer':924,931 'timer-styl':923 'timerinterv':937 'tom':220,713,735 'topic-accessibility' 'topic-agent-skills' 'topic-ai-coding' 'topic-apple' 'topic-claude-code' 'topic-codex-skills' 'topic-cursor-skills' 'topic-ios' 'topic-ios-development' 'topic-liquid-glass' 'topic-localization' 'topic-mapkit' 'two':531 'type':15,62,126,223,230,763,774,790,803,1123,1215 'type-saf':61 'unit':187,193,207,588,593,609,622,631,636,656,681,919,1101,1153 'unitlength.kilometers':682 'unitsformatstyl':586 'unitsstyl':168 'unittemperature.fahrenheit':208,657 'unless':1183 'updat':927 'url':102,103,250,251,853,856,857 'url.formatstyle':882 'url.formatted':252,862,866,874 'url.scheme':253,867,875 'us':271,692 'usag':687,1029,1141,1207 'usd':144,342,361,909 'use':8,16,45,1044,1051,1068,1093,1100,1135,1158,1170,1191 'user':746,1087,1210 'user-fac':1209 'valu':5,39,205,449,654,679,956,985,989,994,1006,1015,1070,1122 'var':701,1025 'view':898 'wednesday':408 'wide':404,406,482,614,661 'width':189,203,211,224,598,613,626,641,660,667,673,685,797,805,1103 'year':156,915 'yesterday':173,445,457 'yesterday.formatted':453,458","prices":[{"id":"68681d7b-70a7-4388-bffc-814ad9af8307","listingId":"3e2c6536-eaa8-4e81-9bef-a108a2aae8a6","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"dpearson2699","category":"swift-ios-skills","install_from":"skills.sh"},"createdAt":"2026-04-23T00:53:25.988Z"}],"sources":[{"listingId":"3e2c6536-eaa8-4e81-9bef-a108a2aae8a6","source":"github","sourceId":"dpearson2699/swift-ios-skills/swift-formatstyle","sourceUrl":"https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/swift-formatstyle","isPrimary":false,"firstSeenAt":"2026-04-23T00:53:25.988Z","lastSeenAt":"2026-05-18T18:53:44.975Z"},{"listingId":"3e2c6536-eaa8-4e81-9bef-a108a2aae8a6","source":"skills_sh","sourceId":"dpearson2699/swift-ios-skills/swift-formatstyle","sourceUrl":"https://skills.sh/dpearson2699/swift-ios-skills/swift-formatstyle","isPrimary":true,"firstSeenAt":"2026-05-07T20:42:01.085Z","lastSeenAt":"2026-05-07T22:41:20.914Z"}],"details":{"listingId":"3e2c6536-eaa8-4e81-9bef-a108a2aae8a6","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"dpearson2699","slug":"swift-formatstyle","github":{"repo":"dpearson2699/swift-ios-skills","stars":599,"topics":["accessibility","agent-skills","ai-coding","apple","claude-code","codex-skills","cursor-skills","ios","ios-development","liquid-glass","localization","mapkit","networking","storekit","swift","swift-concurrency","swiftdata","swiftui","widgetkit","xcode"],"license":"other","html_url":"https://github.com/dpearson2699/swift-ios-skills","pushed_at":"2026-04-26T21:04:17Z","description":"Agent Skills for iOS 26+, Swift 6.3, SwiftUI, and modern Apple frameworks","skill_md_sha":"c74968dfa5c2f637010a16b70559b547ef949630","skill_md_path":"skills/swift-formatstyle/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/swift-formatstyle"},"layout":"multi","source":"github","category":"swift-ios-skills","frontmatter":{"name":"swift-formatstyle","description":"Format values for display using the FormatStyle protocol and its concrete types. Use when formatting numbers (integers, floating-point, decimals), currencies, percentages, dates, date ranges, relative dates, durations (Duration.TimeFormatStyle, Duration.UnitsFormatStyle), measurements, person names (PersonNameComponents.FormatStyle), byte counts (ByteCountFormatStyle), lists (ListFormatStyle), and URLs (URL.FormatStyle). Also covers creating custom FormatStyle conformances and replacing legacy Formatter subclasses. FormatStyle is available iOS 15+; Duration styles require iOS 16+."},"skills_sh_url":"https://skills.sh/dpearson2699/swift-ios-skills/swift-formatstyle"},"updatedAt":"2026-05-18T18:53:44.975Z"}}