{"action":"created","issue":{"url":"https://api.github.com/repos/eddelbuettel/anytime/issues/5","repository_url":"https://api.github.com/repos/eddelbuettel/anytime","labels_url":"https://api.github.com/repos/eddelbuettel/anytime/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/eddelbuettel/anytime/issues/5/comments","events_url":"https://api.github.com/repos/eddelbuettel/anytime/issues/5/events","html_url":"https://github.com/eddelbuettel/anytime/issues/5","id":176958302,"number":5,"title":"anydate transforms to previous day","user":{"login":"twolodzko","id":3750140,"avatar_url":"https://avatars.githubusercontent.com/u/3750140?v=3","gravatar_id":"","url":"https://api.github.com/users/twolodzko","html_url":"https://github.com/twolodzko","followers_url":"https://api.github.com/users/twolodzko/followers","following_url":"https://api.github.com/users/twolodzko/following{/other_user}","gists_url":"https://api.github.com/users/twolodzko/gists{/gist_id}","starred_url":"https://api.github.com/users/twolodzko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twolodzko/subscriptions","organizations_url":"https://api.github.com/users/twolodzko/orgs","repos_url":"https://api.github.com/users/twolodzko/repos","events_url":"https://api.github.com/users/twolodzko/events{/privacy}","received_events_url":"https://api.github.com/users/twolodzko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-14T16:39:58Z","updated_at":"2016-09-14T17:18:32Z","closed_at":null,"body":"`anydate` transforms date to previous day, while `anytime` correctly transforms the dates:\r\n\r\n```\r\n> anydate(20150101)\r\n[1] \"2014-12-31\"\r\n> anydate(\"2015/01/01\")\r\n[1] \"2014-12-31\"\r\n> anytime(20150101)\r\n[1] \"2015-01-01 CET\"\r\n> anytime(\"2015/01/01\")\r\n[1] \"2015-01-01 CET\"\r\n```\r\n\r\nthe workaround is simply to add one:\r\n\r\n```\r\nanydate <- function(x, tz=getTZ()) {\r\n    as.Date(anytime(x=x, tz=tz)) + 1\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/eddelbuettel/anytime/issues/comments/247088050","html_url":"https://github.com/eddelbuettel/anytime/issues/5#issuecomment-247088050","issue_url":"https://api.github.com/repos/eddelbuettel/anytime/issues/5","id":247088050,"user":{"login":"eddelbuettel","id":673121,"avatar_url":"https://avatars.githubusercontent.com/u/673121?v=3","gravatar_id":"","url":"https://api.github.com/users/eddelbuettel","html_url":"https://github.com/eddelbuettel","followers_url":"https://api.github.com/users/eddelbuettel/followers","following_url":"https://api.github.com/users/eddelbuettel/following{/other_user}","gists_url":"https://api.github.com/users/eddelbuettel/gists{/gist_id}","starred_url":"https://api.github.com/users/eddelbuettel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddelbuettel/subscriptions","organizations_url":"https://api.github.com/users/eddelbuettel/orgs","repos_url":"https://api.github.com/users/eddelbuettel/repos","events_url":"https://api.github.com/users/eddelbuettel/events{/privacy}","received_events_url":"https://api.github.com/users/eddelbuettel/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T17:18:32Z","updated_at":"2016-09-14T17:18:32Z","body":"Also:\r\n\r\n```r\r\nR> anytime(\"2015/01/01\", tz=\"CET\")      \r\n[1] \"2015-01-01 07:00:00 CET\"\r\nR> anydate(\"2015/01/01\", tz=\"CET\")\r\n[1] \"2015-01-01\"\r\nR> \r\n```"}}
{"actor":{"display_login":"eddelbuettel"}}