{"id":14,"date":"2009-04-06T13:47:58","date_gmt":"2009-04-06T18:47:58","guid":{"rendered":"http:\/\/developer.casgrain.com\/?p=14"},"modified":"2009-09-02T07:56:26","modified_gmt":"2009-09-02T12:56:26","slug":"day-one-daylight","status":"publish","type":"post","link":"http:\/\/developer.casgrain.com\/?p=14","title":{"rendered":"Day One: Daylight"},"content":{"rendered":"<p>[Update 04\/08\/2009 &#8211; <a href=\"http:\/\/itunes.apple.com\/WebObjects\/MZStore.woa\/wa\/viewSoftware?id=324528814&#038;mt=8\">Daylight is available on the App Store. Have a look, it&#8217;s free!<\/a>]<br \/>\n[Update 19\/07\/2009 &#8211; Daylight has been submitted to the App Store!]<br \/>\n[Update 19\/07\/2009 &#8211; Twilight is now called Daylight.]<\/p>\n<h2>Six Days of Cocoa: Day One<\/h2>\n<p>I found myself with six unexpected days off, so I decided to take them on six consecutive Mondays, when the kids are in school and most of the housework is done, to concentrate on my independent Cocoa projects. These are projects that I started but put on the back burner for lack of &#8220;quality time&#8221;.<\/p>\n<h3>Day One: Daylight <\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/developer.casgrain.com\/images\/twilight.png\" width=\"320\" height=\"460\" alt=\"\" align=\"right\" hspace=\"12\"\/><\/p>\n<p><em> Daylight <\/em> is an iPhone application that I wrote to scratch an itch: when does the sun rise or set every day? It&#8217;s important to me because I bike to work year-round, and cars can see me much better at dusk than they can at night.<\/p>\n<p>\nIt&#8217;s also useful for photographers and filmmakers. One hour before sunset is the so-called &#8220;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Golden_hour_(photography)\">golden hour<\/a>&#8220;, where the shadows are long and the scenery is tinted with an amber glow. Dusk and dawn also form the &#8220;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Blue_hour\">blue hour<\/a>&#8220;, much more important at higher latitudes, where there is no direct sunlight; everything is diffused through the atmosphere. No shadows, no glare, no overexposure&#8230;<\/p>\n<p>\n<em> Daylight <\/em> is extremely simple. It uses Core Location to determine where you are in the world, and uses the internal clock to figure the current time, and offset from GMT.<br \/>\n<br \/>\nThere are only a few settings in <em> Daylight <\/em>. You can choose between <a href=\"http:\/\/en.wikipedia.org\/wiki\/Twilight#Civil_twilight\">Civil<\/a>, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Twilight#Nautical_twilight\">Nautical<\/a> and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Twilight#Astronomical_twilight\">Astronomical<\/a> twilight, set the date (defaults to Today) and reset your location (which is cached for 30 days by default).<\/p>\n<p>\n<em> Daylight <\/em> is perhaps the very definition of a one-shot app: you launch it, it does what it says, and you&#8217;re done. It encourages discoverability by having large buttons and a little bit of animation.<\/p>\n<p><br clear=\"all\"\/><\/p>\n<p><del datetime=\"2009-09-02T12:52:59+00:00\">Today, I found the one bug that was preventing me from going forward, so I am looking for beta-testers for <em> Daylight <\/em>. If you are interested, please send me a direct message on Twitter (<code>d daylightapp<\/code>) or send an email to daylight-beta@casgrain.com with your <a href=\"http:\/\/developer.casgrain.com\/?p=13\">device&#8217;s identifier<\/a>.<\/del><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[Update 04\/08\/2009 &#8211; Daylight is available on the App Store. Have a look, it&#8217;s free!] [Update 19\/07\/2009 &#8211; Daylight has been submitted to the App Store!] [Update 19\/07\/2009 &#8211; Twilight is now called Daylight.] Six Days of Cocoa: Day One I found myself with six unexpected days off, so I decided to take them on [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-sixdays"],"_links":{"self":[{"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":4,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":76,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions\/76"}],"wp:attachment":[{"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}