{"id":717,"date":"2015-11-18T11:16:56","date_gmt":"2015-11-18T03:16:56","guid":{"rendered":"http:\/\/magicalbits.net\/?p=717"},"modified":"2015-11-18T11:17:50","modified_gmt":"2015-11-18T03:17:50","slug":"danthorpemoney","status":"publish","type":"post","link":"https:\/\/magicalbits.net\/?p=717","title":{"rendered":"danthorpe\/Money"},"content":{"rendered":"<blockquote><p><a href=\"https:\/\/github.com\/danthorpe\/Money\"><img decoding=\"async\" class=\"alignnone size-full\" src=\"http:\/\/magicalbits.net\/wp-content\/uploads\/2015\/11\/header.png\" alt=\"\" \/><\/a><\/p><\/blockquote>\n<blockquote><p>Money Money is a Swift framework for iOS, watchOS, tvOS and OS X. It provides types and functionality to represent, calculate and convert money in the 298 ISO currencies.<\/p>\n<div class=\"highlight highlight-source-swift\">\n<pre><span class=\"pl-k\">let<\/span> pounds: GBP <span class=\"pl-k\">=<\/span> <span class=\"pl-c1\">99<\/span><span class=\"pl-k\">.<\/span><span class=\"pl-c1\">99<\/span>\n<span class=\"pl-k\">let<\/span> euros: EUR <span class=\"pl-k\">=<\/span> <span class=\"pl-c1\">149<\/span><span class=\"pl-k\">.<\/span><span class=\"pl-c1\">50<\/span>\n\n<span class=\"pl-c1\">print<\/span>(\u201cYou have \\(pounds <span class=\"pl-k\">\/<\/span> <span class=\"pl-c1\">2<\/span>) and \\(euros <span class=\"pl-k\">+<\/span> <span class=\"pl-c1\">30<\/span>)\u201d)<\/pre>\n<\/div>\n<blockquote><p>You have \u00a3\u00a050.00 and \u20ac\u00a0179.50<\/p><\/blockquote>\n<p>Because the currencies are typed, it means that they cannot be combined together.<\/p>\n<div class=\"highlight highlight-source-swift\">\n<pre><span class=\"pl-k\">let<\/span> money <span class=\"pl-k\">=<\/span> pounds <span class=\"pl-k\">+<\/span> euros<\/pre>\n<\/div>\n<\/blockquote>\n<p>Source: <em><a href=\"https:\/\/github.com\/danthorpe\/Money\">danthorpe\/Money<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Money Money is a Swift framework for iOS, watchOS, tvOS and OS X. It provides types and functionality to represent, calculate and convert money in the 298 ISO currencies. let pounds: GBP = 99.99 let euros: EUR = 149.50 print(\u201cYou have \\(pounds \/ 2) and \\(euros + 30)\u201d) You have \u00a3\u00a050.00 and \u20ac\u00a0179.50 Because the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-717","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/magicalbits.net\/index.php?rest_route=\/wp\/v2\/posts\/717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/magicalbits.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/magicalbits.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/magicalbits.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/magicalbits.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=717"}],"version-history":[{"count":2,"href":"https:\/\/magicalbits.net\/index.php?rest_route=\/wp\/v2\/posts\/717\/revisions"}],"predecessor-version":[{"id":721,"href":"https:\/\/magicalbits.net\/index.php?rest_route=\/wp\/v2\/posts\/717\/revisions\/721"}],"wp:attachment":[{"href":"https:\/\/magicalbits.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/magicalbits.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/magicalbits.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}