{"action":"created","issue":{"url":"https://api.github.com/repos/edzer/units/issues/17","repository_url":"https://api.github.com/repos/edzer/units","labels_url":"https://api.github.com/repos/edzer/units/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/edzer/units/issues/17/comments","events_url":"https://api.github.com/repos/edzer/units/issues/17/events","html_url":"https://github.com/edzer/units/issues/17","id":189721257,"number":17,"title":"sort out udunits calender and R's calender","user":{"login":"edzer","id":520851,"avatar_url":"https://avatars1.githubusercontent.com/u/520851?v=4","gravatar_id":"","url":"https://api.github.com/users/edzer","html_url":"https://github.com/edzer","followers_url":"https://api.github.com/users/edzer/followers","following_url":"https://api.github.com/users/edzer/following{/other_user}","gists_url":"https://api.github.com/users/edzer/gists{/gist_id}","starred_url":"https://api.github.com/users/edzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edzer/subscriptions","organizations_url":"https://api.github.com/users/edzer/orgs","repos_url":"https://api.github.com/users/edzer/repos","events_url":"https://api.github.com/users/edzer/events{/privacy}","received_events_url":"https://api.github.com/users/edzer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-16T14:32:09Z","updated_at":"2017-08-20T10:37:55Z","closed_at":null,"body":"e.g. how to convert from `POSIXct` or `Date` to a `udunits` value. See also [here](https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/CDM/CalendarDateTime.html). \r\n\r\nThe question is whether udunits calender has additional value to R:\r\n```\r\n> d = make_units(\"days since 1970-01-01\")\r\n> as.numeric(as.Date(\"1971-01-01\")) * d\r\n365 (days since 1970-01-01)\r\n> d * as.Date(\"1974-01-01\")\r\n1461 (days since 1970-01-01)\r\nWarning message:\r\nIncompatible methods (\"Ops.units\", \"Ops.Date\") for \"*\" \r\n```\r\nFor this particular case, I think the warning message could disappear, since both have identical units."},"comment":{"url":"https://api.github.com/repos/edzer/units/issues/comments/323576942","html_url":"https://github.com/edzer/units/issues/17#issuecomment-323576942","issue_url":"https://api.github.com/repos/edzer/units/issues/17","id":323576942,"user":{"login":"mjwoods","id":16091567,"avatar_url":"https://avatars3.githubusercontent.com/u/16091567?v=4","gravatar_id":"","url":"https://api.github.com/users/mjwoods","html_url":"https://github.com/mjwoods","followers_url":"https://api.github.com/users/mjwoods/followers","following_url":"https://api.github.com/users/mjwoods/following{/other_user}","gists_url":"https://api.github.com/users/mjwoods/gists{/gist_id}","starred_url":"https://api.github.com/users/mjwoods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjwoods/subscriptions","organizations_url":"https://api.github.com/users/mjwoods/orgs","repos_url":"https://api.github.com/users/mjwoods/repos","events_url":"https://api.github.com/users/mjwoods/events{/privacy}","received_events_url":"https://api.github.com/users/mjwoods/received_events","type":"User","site_admin":false},"created_at":"2017-08-20T10:37:55Z","updated_at":"2017-08-20T10:37:55Z","body":"RNetCDF may do what you want. For example:\r\n\r\n```r\r\n> library(RNetCDF)\r\n> utinvcal.nc(\"hours since 1900-01-01 00:00:00 +01:00\", ISOdatetime(1900,1,1,5,25,0,tz=\"UTC\"))\r\n[1] 6.416667\r\n```"}}
{"actor":{"display_login":"mjwoods"}}