{"action":"created","issue":{"url":"https://api.github.com/repos/magplus/good_times/issues/28","labels_url":"https://api.github.com/repos/magplus/good_times/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/magplus/good_times/issues/28/comments","events_url":"https://api.github.com/repos/magplus/good_times/issues/28/events","html_url":"https://github.com/magplus/good_times/pull/28","id":60930055,"number":28,"title":"Conversion functions","user":{"login":"DevL","id":201944,"avatar_url":"https://avatars.githubusercontent.com/u/201944?v=3","gravatar_id":"","url":"https://api.github.com/users/DevL","html_url":"https://github.com/DevL","followers_url":"https://api.github.com/users/DevL/followers","following_url":"https://api.github.com/users/DevL/following{/other_user}","gists_url":"https://api.github.com/users/DevL/gists{/gist_id}","starred_url":"https://api.github.com/users/DevL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevL/subscriptions","organizations_url":"https://api.github.com/users/DevL/orgs","repos_url":"https://api.github.com/users/DevL/repos","events_url":"https://api.github.com/users/DevL/events{/privacy}","received_events_url":"https://api.github.com/users/DevL/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-12T23:09:54Z","updated_at":"2015-03-12T23:28:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/magplus/good_times/pulls/28","html_url":"https://github.com/magplus/good_times/pull/28","diff_url":"https://github.com/magplus/good_times/pull/28.diff","patch_url":"https://github.com/magplus/good_times/pull/28.patch"},"body":"Addressing #12, this adds the following functions in the new module `GoodTimes.Convert`:\r\n\r\n```elixir\r\ndatetime_to_date/1\r\ndatetime_to_time/1\r\ndate_to_datetime/1\r\n```\r\n\r\nI considered adding `time_to_datetime/1` for the sake of symmetry, but I'm not sure if it's useful to convert a time of day to the same time of day on January 1, year 0.\r\n\r\nWould it be worth shortening `datetime_to_date` / `datetime_to_time` to just `to_date` / `to_time`? It certainly reads nicer, and it could be argued that all our functions, unless explicitly stated, operates on `datetime`s, making the first part of the function names redundant. `date_to_datetime` probably needs to be explicit unless is handles both `date`s and `datetime`s (returning the `datetime` unaltered)."},"comment":{"url":"https://api.github.com/repos/magplus/good_times/issues/comments/78689785","html_url":"https://github.com/magplus/good_times/pull/28#issuecomment-78689785","issue_url":"https://api.github.com/repos/magplus/good_times/issues/28","id":78689785,"user":{"login":"martinsvalin","id":203989,"avatar_url":"https://avatars.githubusercontent.com/u/203989?v=3","gravatar_id":"","url":"https://api.github.com/users/martinsvalin","html_url":"https://github.com/martinsvalin","followers_url":"https://api.github.com/users/martinsvalin/followers","following_url":"https://api.github.com/users/martinsvalin/following{/other_user}","gists_url":"https://api.github.com/users/martinsvalin/gists{/gist_id}","starred_url":"https://api.github.com/users/martinsvalin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinsvalin/subscriptions","organizations_url":"https://api.github.com/users/martinsvalin/orgs","repos_url":"https://api.github.com/users/martinsvalin/repos","events_url":"https://api.github.com/users/martinsvalin/events{/privacy}","received_events_url":"https://api.github.com/users/martinsvalin/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T23:28:03Z","updated_at":"2015-03-12T23:28:03Z","body":"rebased"}}