{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"anytime: Anything to 'POSIXct' or 'Date' Converter Motivation R excels at computing with dates, and times. Using typed representation for your data is highly recommended not only because of the functionality offered but also because of the added safety stemming from proper representation. But there is a small nuisance cost in interactive work as well as in programming. Users must have told as.POSIXct() about a million times that the origin is (of course) the epoch . Do we really have to say it a million more times? Similarly, when parsing dates that are some form of YYYYMMDD format, do we really have to manually convert from integer or numeric or factor or ordered to character? Having one of several common separators and/or date / time month forms (YYYY-MM-DD, YYYY/MM/DD, YYYYMMDD, YYYY-mon-DD and so on, with or without times), do we really need a format string? Or could a smart converter function do this? anytime() aims to be that general purpose converter returning a proper POSIXct (or Date ) object no matter the input (provided it was somewhat parseable), relying on Boost date_time for the (efficient, performant) conversion. anydate() is an additional wrapper returning a Date object instead. Documentation Package documentation, help pages, a vignette, and more is available here . Examples We show some simple examples on Date types. (Note that in the first few examples, and for numeric conversion in this range we now only use anydate as anytime is consistent in computing seconds since epoch. If you want the behaviour of version older than 0.3.0, set oldHeuristic=TRUE , see help(anytime) for more.) From Integer or Numeric or Factor or Ordered library(anytime) ## also caches TZ in local env options(digits.secs=6) ## for fractional seconds below ## integer anydate(20160101L + 0:2) ## older version used anytime for this too [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\" ## numeric anydate(20160101 + 0:2) [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\" ## factor anydate(as.factor(20160101 + 0:2)) [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\" ## ordered anydate(as.ordered(20160101 + 0:2)) [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\" Character: Simple ## Dates: Character anydate(as.character(20160101 + 0:2)) [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\" ## Dates: alternate formats anydate(c(\"20160101\", \"2016/01/02\", \"2016-01-03\")) [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\" Character: ISO ## Datetime: ISO with/without fractional seconds anytime(c(\"2016-01-01 10:11:12\", \"2016-01-01 10:11:12.345678\")) [1] \"2016-01-01 10:11:12.000000 CST\" \"2016-01-01 10:11:12.345678 CST\" ## Datetime: ISO alternate (?) with 'T' separator anytime(c(\"20160101T101112\", \"20160101T101112.345678\")) [1] \"2016-01-01 10:11:12.000000 CST\" \"2016-01-01 10:11:12.345678 CST\" Character: Textual month formats ## ISO style anytime(c(\"2016-Sep-01 10:11:12\", \"Sep/01/2016 10:11:12\", \"Sep-01-2016 10:11:12\")) [1] \"2016-09-01 10:11:12 CDT\" \"2016-09-01 10:11:12 CDT\" \"2016-09-01 10:11:12 CDT\" ## Datetime: Mixed format (cf https://stackoverflow.com/questions/39259184) anytime(c(\"Thu Sep 01 10:11:12 2016\", \"Thu Sep 01 10:11:12.345678 2016\")) [1] \"2016-09-01 10:11:12.000000 CDT\" \"2016-09-01 10:11:12.345678 CDT\" Character: Dealing with DST This shows an important aspect. When not working localtime (by overriding to UTC ) the changing difference UTC is correctly covered (which the underlying Boost Date_Time library does not by itself). ## Datetime: pre/post DST anytime(c(\"2016-01-31 12:13:14\", \"2016-08-31 12:13:14\")) [1] \"2016-01-31 12:13:14 CST\" \"2016-08-31 12:13:14 CDT\" anytime(c(\"2016-01-31 12:13:14\", \"2016-08-31 12:13:14\"), tz=\"UTC\") # important: catches change [1] \"2016-01-31 18:13:14 UTC\" \"2016-08-31 17:13:14 UTC\" Technical Details The heavy lifting is done by a combination of Boost lexical_cast to go from anything to string representation which is then parsed by Boost Date_Time . We use the BH package to access Boost , and rely on Rcpp for a seamless C++ interface to and from R . Further, as the Boost Date_Time library cannot resolve timezones on the Windows platform (where timezone information is typically provided by R itself for its use), we offer a fallback of calling into R (via facilities from Rcpp ); see the help for the useR argument for more details. Status The package should work as expected. Example Uses Several different CRAN packages import this package. Among them are the following research-focused packages: adheRenceRX by Beal assesses medication adherence; AGread by Hibbing et al which reads and transforms ActiGraph physical activity measures; cqcr by Odell accesses 'Care Quality Commission' data from the health and adult social care regulator for England; datadogr by Yutani queries metrics from Datadog; E4tools by Kleiman which reads data from Empatica wearable physiology monitors; nprcgenekeepr by Raboin et al provides genetic tools for colony management ; RDS by Handcock et al which is part of the \"RDS Ananlyst\" suite for analysing respondent-driven sampling data; rtsdata by RTSVizTeam manages time series data dtorage; threesixtygiving by Odell accesses download charitable grants from the '360Giving' Platform; tsbox by Sax for format-agnostic time series data representation and conversions; tsibble by Wang et al for temporal data in an explicit data- and model-oriented format. Changes See the NEWS.Rd file on CRAN or GitHub . In particular, version 0.3.0 corrects an overly optimistic heuristic for integer or numeric arguments and now behaves more like R itself. Specifically, epoch offsets are interpreted as seconds for datetime objects, and days for date objects. The prior behaviour can be restored with an option which also be be set globally, see the help page for details. Installation The package is now on CRAN and can be installed via a standard install.packages(\"anytime\") Continued Testing As we rely on the tinytest package, the already-installed package can also be verified via tinytest::test_package(\"anytime\") at any later point. Contributing Any problems, bug reports, or features requests for the package can be submitted and handled most conveniently as Github issues in the repository. Before submitting pull requests, it is frequently preferable to first discuss need and scope in such an issue ticket. See the file Contributing.md (in the Rcpp repo) for a brief discussion. Author Dirk Eddelbuettel License GPL (>= 2)","title":"Index"},{"location":"#anytime-anything-to-posixct-or-date-converter","text":"","title":"anytime: Anything to 'POSIXct' or 'Date' Converter"},{"location":"#motivation","text":"R excels at computing with dates, and times. Using typed representation for your data is highly recommended not only because of the functionality offered but also because of the added safety stemming from proper representation. But there is a small nuisance cost in interactive work as well as in programming. Users must have told as.POSIXct() about a million times that the origin is (of course) the epoch . Do we really have to say it a million more times? Similarly, when parsing dates that are some form of YYYYMMDD format, do we really have to manually convert from integer or numeric or factor or ordered to character? Having one of several common separators and/or date / time month forms (YYYY-MM-DD, YYYY/MM/DD, YYYYMMDD, YYYY-mon-DD and so on, with or without times), do we really need a format string? Or could a smart converter function do this? anytime() aims to be that general purpose converter returning a proper POSIXct (or Date ) object no matter the input (provided it was somewhat parseable), relying on Boost date_time for the (efficient, performant) conversion. anydate() is an additional wrapper returning a Date object instead.","title":"Motivation"},{"location":"#documentation","text":"Package documentation, help pages, a vignette, and more is available here .","title":"Documentation"},{"location":"#examples","text":"We show some simple examples on Date types. (Note that in the first few examples, and for numeric conversion in this range we now only use anydate as anytime is consistent in computing seconds since epoch. If you want the behaviour of version older than 0.3.0, set oldHeuristic=TRUE , see help(anytime) for more.)","title":"Examples"},{"location":"#from-integer-or-numeric-or-factor-or-ordered","text":"library(anytime) ## also caches TZ in local env options(digits.secs=6) ## for fractional seconds below ## integer anydate(20160101L + 0:2) ## older version used anytime for this too [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\" ## numeric anydate(20160101 + 0:2) [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\" ## factor anydate(as.factor(20160101 + 0:2)) [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\" ## ordered anydate(as.ordered(20160101 + 0:2)) [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\"","title":"From Integer or Numeric or Factor or Ordered"},{"location":"#character-simple","text":"## Dates: Character anydate(as.character(20160101 + 0:2)) [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\" ## Dates: alternate formats anydate(c(\"20160101\", \"2016/01/02\", \"2016-01-03\")) [1] \"2016-01-01 CST\" \"2016-01-02 CST\" \"2016-01-03 CST\"","title":"Character: Simple"},{"location":"#character-iso","text":"## Datetime: ISO with/without fractional seconds anytime(c(\"2016-01-01 10:11:12\", \"2016-01-01 10:11:12.345678\")) [1] \"2016-01-01 10:11:12.000000 CST\" \"2016-01-01 10:11:12.345678 CST\" ## Datetime: ISO alternate (?) with 'T' separator anytime(c(\"20160101T101112\", \"20160101T101112.345678\")) [1] \"2016-01-01 10:11:12.000000 CST\" \"2016-01-01 10:11:12.345678 CST\"","title":"Character: ISO"},{"location":"#character-textual-month-formats","text":"## ISO style anytime(c(\"2016-Sep-01 10:11:12\", \"Sep/01/2016 10:11:12\", \"Sep-01-2016 10:11:12\")) [1] \"2016-09-01 10:11:12 CDT\" \"2016-09-01 10:11:12 CDT\" \"2016-09-01 10:11:12 CDT\" ## Datetime: Mixed format (cf https://stackoverflow.com/questions/39259184) anytime(c(\"Thu Sep 01 10:11:12 2016\", \"Thu Sep 01 10:11:12.345678 2016\")) [1] \"2016-09-01 10:11:12.000000 CDT\" \"2016-09-01 10:11:12.345678 CDT\"","title":"Character: Textual month formats"},{"location":"#character-dealing-with-dst","text":"This shows an important aspect. When not working localtime (by overriding to UTC ) the changing difference UTC is correctly covered (which the underlying Boost Date_Time library does not by itself). ## Datetime: pre/post DST anytime(c(\"2016-01-31 12:13:14\", \"2016-08-31 12:13:14\")) [1] \"2016-01-31 12:13:14 CST\" \"2016-08-31 12:13:14 CDT\" anytime(c(\"2016-01-31 12:13:14\", \"2016-08-31 12:13:14\"), tz=\"UTC\") # important: catches change [1] \"2016-01-31 18:13:14 UTC\" \"2016-08-31 17:13:14 UTC\"","title":"Character: Dealing with DST"},{"location":"#technical-details","text":"The heavy lifting is done by a combination of Boost lexical_cast to go from anything to string representation which is then parsed by Boost Date_Time . We use the BH package to access Boost , and rely on Rcpp for a seamless C++ interface to and from R . Further, as the Boost Date_Time library cannot resolve timezones on the Windows platform (where timezone information is typically provided by R itself for its use), we offer a fallback of calling into R (via facilities from Rcpp ); see the help for the useR argument for more details.","title":"Technical Details"},{"location":"#status","text":"The package should work as expected.","title":"Status"},{"location":"#example-uses","text":"Several different CRAN packages import this package. Among them are the following research-focused packages: adheRenceRX by Beal assesses medication adherence; AGread by Hibbing et al which reads and transforms ActiGraph physical activity measures; cqcr by Odell accesses 'Care Quality Commission' data from the health and adult social care regulator for England; datadogr by Yutani queries metrics from Datadog; E4tools by Kleiman which reads data from Empatica wearable physiology monitors; nprcgenekeepr by Raboin et al provides genetic tools for colony management ; RDS by Handcock et al which is part of the \"RDS Ananlyst\" suite for analysing respondent-driven sampling data; rtsdata by RTSVizTeam manages time series data dtorage; threesixtygiving by Odell accesses download charitable grants from the '360Giving' Platform; tsbox by Sax for format-agnostic time series data representation and conversions; tsibble by Wang et al for temporal data in an explicit data- and model-oriented format.","title":"Example Uses"},{"location":"#changes","text":"See the NEWS.Rd file on CRAN or GitHub . In particular, version 0.3.0 corrects an overly optimistic heuristic for integer or numeric arguments and now behaves more like R itself. Specifically, epoch offsets are interpreted as seconds for datetime objects, and days for date objects. The prior behaviour can be restored with an option which also be be set globally, see the help page for details.","title":"Changes"},{"location":"#installation","text":"The package is now on CRAN and can be installed via a standard install.packages(\"anytime\")","title":"Installation"},{"location":"#continued-testing","text":"As we rely on the tinytest package, the already-installed package can also be verified via tinytest::test_package(\"anytime\") at any later point.","title":"Continued Testing"},{"location":"#contributing","text":"Any problems, bug reports, or features requests for the package can be submitted and handled most conveniently as Github issues in the repository. Before submitting pull requests, it is frequently preferable to first discuss need and scope in such an issue ticket. See the file Contributing.md (in the Rcpp repo) for a brief discussion.","title":"Contributing"},{"location":"#author","text":"Dirk Eddelbuettel","title":"Author"},{"location":"#license","text":"GPL (>= 2)","title":"License"},{"location":"changelog/","text":"2023 2023-09-13 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (convertToTime): Warn if NA values resulting from conversion to character (and only one warning will be give) * R/anytime.R: Updated docs * man/anytime.Rd: Idem 2023-09-09 Dirk Eddelbuettel edd@debian.org * tests/tinytest.R: Simplified 2023-04-17 Dirk Eddelbuettel edd@debian.org * src/Makevars: Delete unneeded filed * src/Makevars.win: Idem 2023-02-04 Dirk Eddelbuettel edd@debian.org * src/Makevars: No longer set a C++ standard * src/Makevars.win: Idem 2023-02-01 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version and date * src/Makevars (CXX_STD): Set C++ standard to C++17 * src/Makevars.win (CXX_STD): Idem * src/anytime.cpp: Set include header to Rcpp/Lightest * inst/NEWS.Rd: Update NEWS.Rd * cleanup: Remove src/symbols.rds 2023-01-14 Dirk Eddelbuettel edd@debian.org * README.md: Correct URL for codecov.io badge 2022 2022-12-11 Dirk Eddelbuettel edd@debian.org * README.md: Update one URL * R/formats.R: Update URL to RFC3339 * man/iso8601.Rd: Idem 2022-10-31 Dirk Eddelbuettel edd@debian.org * .github/workflows/ci.yaml (jobs): Update to actions/checkout@v3 2022-01-25 Dirk Eddelbuettel edd@debian.org * README.md: Add total downloads badge 2021 2021-11-04 Dirk Eddelbuettel edd@debian.org * README.md: Remove Travis badge * .travis.yml: Remove Travis YAML config 2021-06-09 Dirk Eddelbuettel edd@debian.org * anytime.Rproj: Removed 2021-06-07 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (sformats): Support additional formats that are dot-sepatated such as '%Y.%m.%d' and variants * R/anytime.R: Add a 'see also' link to 'getFormats' * man/anytime.Rd: Ditto 2021-03-28 Dirk Eddelbuettel edd@debian.org * docs/mkdmt-src/: Moved mkdocs-material input 2021-03-19 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (URL): List GitHub repo and package page 2021-03-03 Dirk Eddelbuettel edd@debian.org * .editorconfig: Added * README.md: Expanded list of packages using anytime 2021-03-02 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (anytime_cpp): In case of a logical input vector, error out with message * inst/tinytest/test_all_formats.R: Add simple tests 2020 2020-12-30 Dirk Eddelbuettel edd@debian.org * .github/workflows/ci.yaml: Rename job from build to ci 2020-12-24 Dirk Eddelbuettel edd@debian.org * .github/workflows/ci.yaml: Small tweaks to CI YAML file 2020-12-10 Dirk Eddelbuettel edd@debian.org * .github/workflows/ci.yaml: Add CI runner using r-ci * README.md: Add new CI badge 2020-11-21 Dirk Eddelbuettel edd@debian.org * .travis.yml: Use renamed r-ci repository URL 2020-11-18 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * .travis.yml: Switch to focal and bspm, activate macOS build * inst/tinytest/test_all_formats.R: untabify a section 2020-10-25 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_simple.R: Reactivate tests with added check.tzone=FALSE 2020-09-12 Dirk Eddelbuettel edd@debian.org * docs/: Added package website * docs-src/: Added package website inputs * README.md: Added badge and short paragraph linking to documentation 2020-08-26 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.9 * inst/tinytest/test_simple.R: Giving up on CRAN as timezone attributes are inconsistently set between machines * R/anytime.R: Change http:// to https:// * man/anytime.Rd: Idem * man/anytime-package.Rd: Idem * README.md: Idem 2020-07-23 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.8 2020-07-22 Dirk Eddelbuettel edd@debian.org * tests/tinytest.R: No longer call tests in parallel 2020-07-20 Dirk Eddelbuettel edd@debian.org * .travis.yml: Switch to 'bionic' and R 4.0.* 2020-07-12 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * R/init.R: Support OS detection for some flavours of Linux, add predicates to test e.g. .isUbuntu() vs .isFedora() * NAMESPACE: Import utils::read.table() for this * inst/tinytest/test_simple.R: Also skip if on Fedora as the CRAN tests apparently cannot be fixed 2020-04-14 Dirk Eddelbuettel edd@debian.org * README.md (tinytest): Add 'last commit' badge 2020-01-20 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.7 * cleanup: Partly rewritten to fall afoul of bashism tests 2020-01-19 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * R/anytime.R: Minor code tightening for calcUnique * inst/tinytest/test_calc_unique.R: Renamed from test_pr_110.R 2020-01-18 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_pr_110.R: New test for PR 110 * R/anytime.R: Reassert proper line-endings, add nocov tags * man/anytime.Rd: Re-run roxygenize() 2020-01-18 Stephen Froehlich s.froehlich@cablelabs.com * R/anytime.R: Add new option 'calcUnique' for more efficient processing of input with many repeated values * man/anytime.Rd: Add documentation 2020-01-10 Dirk Eddelbuettel edd@debian.org * README.md: Add another usage example 2019 2019-11-29 Dirk Eddelbuettel edd@debian.org * src/Makevars (PKG_CXXFLAGS): Use no-rtti define for Rcpp 2019-10-12 Dirk Eddelbuettel edd@debian.org * README.md: Add CRAN usage badge 2019-08-30 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * inst/tinytest/test_simple.R: Add new 'isStupid' test 2019-08-29 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.6 2019-08-24 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * DESCRIPTION: Suggests on tinytest now '(>= 1.0.0)' * tests/tinytests.R: Check for tinytest '(>= 1.0.0)' * inst/tinytest/test_simple.R: Add two more tests * vignettes/rmd/anytime-intro.Rmd: Updated * vignettes/anytime-intro.pdf: Idem 2019-08-23 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (ptToDoubleUTC): One more #nocov tag 2019-08-18 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_all_formats.R: Small refactoring 2019-08-16 Dirk Eddelbuettel edd@debian.org * DESCRIPTION: Suggests on tinytest now '(>= 0.9.6.13)' * tests/tinytest.R: Now with parallel execution and side effect * inst/tinytest/test_all_formats.R: Now uses tinytest::exit_file() * inst/tinytest/test_bulk.R: Idem * inst/tinytest/test_simple.R: Idem 2019-08-14 Dirk Eddelbuettel edd@debian.org * README.md: Add section on example uses 2019-08-12 Dirk Eddelbuettel edd@debian.org * inst/tinytest/hide/test_r_format.R: Moved as zero active tests * inst/tinytest/hide/test_gh_issues_36_51.R: Ditto 2019-08-10 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: Add missing commas in format definition * vignettes/rmd/anytime-intro.Rmd: Some more edits * vignettes/anytime-intro.pdf: Idem * vignettes/rmd/anytime.bib: Added entries 2019-08-09 Dirk Eddelbuettel edd@debian.org * inst/tinytest/hide/test_gh_issue_5.R: Temporarily moved test which upsets two of the rhub builders * inst/tinytest/hide/test_gh_issue_84.R: Ditto * inst/tinytest/hide/test_gh_issue_96.R: Ditto * inst/tinytest/hide/test_validate.R: Ditto 2019-08-07 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp: Complement existing sformats[] with '%e' variants to allow single-digit days to be parse by Boost date_time 2019-08-04 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * R/anytime.R (anytime,anydate,utcdate): Rewritten using S3 dispatch * R/formats.R (iso8601,rfc2822,rfc3339): Ditto * NAMESPACE: Register new S3 methods * inst/tinytest/test_all_formats.R: Tweaking tests to accomodate rhub * inst/tinytest/test_bulk.R: Idem * inst/tinytest/test_gh_issue_96.R: Idem * inst/tinytest/test_validate.R: Idem 2019-07-30 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (fmt): Renamed from format() to avoid clashes * src/RcppExports.cpp (_anytime_fmt): Idem * R/RcppExports.R (fmt): Idem * inst/tinytest/test_simple.R: Ditto in test use * inst/tinytest/test_all_formats.R: Idem 2019-07-29 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_simple.R: A few more simple tests 2019-07-28 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.5 * vignettes/rmd/anytime-intro.Rmd: More edits * vignettes/anytime-intro.pdf: Idem * inst/tinytest/test_gh_issue_96.R: More polish * inst/tinytest/test_useR.R: Idem * local/test_useR.R: Deactivated as it fails at Travis 2019-07-27 Dirk Eddelbuettel edd@debian.org * R/anytime.R (utctime): Account for difference to UTC when useR=TRUE * inst/tinytest/test_useR.R: New test file for useR=TRUE * inst/tinytest/test_all_formats.R: Condition a few more tests * inst/tinytest/test_gh_issue_96.R: Lower 'tol' on two tests * inst/tinytest/test_all_formats.R: Set TZ at start * inst/tinytest/test_assertions.R: Idem * inst/tinytest/test_bulk.R: Idem * inst/tinytest/test_gh_issue_100.R: Idem * inst/tinytest/test_utilities.R: Idem * vignettes/rmd/anytime-intro.Rmd: Some edits 2019-07-26 Dirk Eddelbuettel edd@debian.org * R/anytime.R (utctime, anydate, utcdate): Also use option for possible useR default * R/format.R: Documentation tweaks * man/anytime-package.Rd: Idem * man/iso8601.Rd: Idem * README.md: Idem * vignettes/rmd/anytime-introduction.Rmd: Idem 2019-07-25 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (r_stringToTime): Correct 'useR' to date conversion 2019-07-24 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * inst/tinytest/test_all_formats.R: Tweaks for Windows tests * inst/tinytest/test_bulk.R: Idem * .travis.yml (install): Simplified with two fewer required packages 2019-07-23 Dirk Eddelbuettel edd@debian.org * R/anytime.R (anytime): The useR argument can now be set via an option * man/anytime.Rd: Ditto 2019-07-21 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_r_format.R: Deactivate test as it fails on Travis 2019-07-20 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (r_stringToTime): Use Rcpp::Function to access R functionality instead of using RApiDatetime * DESCRIPTION: No longer import RApiDatetime * NAMESPACE: Idem * inst/tinytest/test_all_formats.R: Loosen Windows test restrictions * inst/tinytest/test_gh_issue_96.R: Idem 2019-07-17 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: A few minor #nocov additions * inst/tinytest/test_all_formats.R: Add test for anydate with useR 2019-07-16 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (r_stringToTime): Skip tz argument, change internal conversion logic and reflect optional asDate argument * inst/tinytest/test_r_format.R: Skip for now * inst/tinytest/test_bulk.R (fullPOSIXctEx): Set TZ once 2019-07-14 Dirk Eddelbuettel edd@debian.org * R/anytime.R: Add a paragraph warning about possibly issue on Windows due to Boost ignoring TZ (but using the tzutil program) * tests/tinytest.R: Call as utils::packageVersions() * inst/tinytest/test_all_formats.R: Idem * inst/tinytest/test_bulk.R: Idem * inst/tinytest/test_gh_issue_5.R: Idem * inst/tinytest/test_utilities.R: Idem * inst/tinytest/test_validate.R: Idem 2019-07-08 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (ptToDouble): Another debug message 2019-07-05 Dirk Eddelbuettel edd@debian.org * .travis.yml (install): Use r-cran-tinytest from PPA 2019-06-27 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version 2019-06-26 Christoph Sax christoph.sax@gmail.com * src/anytime.cpp: Correct use via Rcpp::Function imported Sys.setenv on Windows * R/anytime.R: Use all argument to anytime_cpp() * inst/tinytest/test_gh_issue_56.R: Relax Windows test constraint * inst/tinytest/test_gh_issue_84.R: Idem * inst/tinytest/test_simple.R: Idem * inst/tinytest/test_utilities.R: Idem 2019-06-23 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * inst/tinytest/test_all_formats.R: Add three tests to complete coverage * src/anytime.cpp (convertToTime): Some #nocov attributes 2019-06-18 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.4 2019-06-17 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_all_formats.R: Do not run test for releases * inst/tinytest/test_bulk.R: Idem * inst/tinytest/test_gh_issue_5.R: Idem * inst/tinytest/test_validate.R: Idem 2019-06-16 Dirk Eddelbuettel edd@debian.org * vignettes/anytime-introduction.Rnw: Vignette wrapper with tip of the hat to Mark van der Loo for his January 2019 blog post * vignettes/rmd/anytime-intro.Rmd: Moved * vignettes/rmd/anytime.bib: Idem * vignettes/rmd/anytime-intro.Rmd: Updated * vignettes/anytime-intro.pdf: Idem * vignettes/anytime-intro.pdf: Ran compactPDF(gs_quality = \"ebook\") * .codecov.yml (coverage): Make patch behaviour more quiet * inst/tinytest/test_simple.R: Test old format 2019-06-15 Dirk Eddelbuettel edd@debian.org * R/formats.R (iso8601): Switch format to ISO8601 use with T between date and time; allow option to override for old behaviour. * man/iso8601.Rd: Document new behaviour and option. 2019-06-10 Dirk Eddelbuettel edd@debian.org * README.md (tinytest): Mention post-install testing 2019-06-09 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (r_stringToTime): Use Sys.setenv() from R on Windows as the latter OS remains \"special\" * inst/tinytest/test_all_formats.R: Exempt Windows from some tests * inst/tinytest/test_bulk.R: ditto * inst/tinytest/test_gh_issue_5.R: ditto * inst/tinytest/test_gh_issue_84.R: ditto * inst/tinytest/test_r_format.R: ditto * inst/tinytest/test_simple.R: ditto * inst/tinytest/test_utilities.R: ditto * inst/tinytest/test_validate.R: ditto 2019-06-08 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_r_format.R: Renamed for consistency * inst/tinytest/test_gh_issue_33.R: Idem * inst/tinytest/test_gh_issue_12.R: Idem * inst/tinytest/test_utilities.R: Idem 2019-06-07 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_assertions.R: From tests/assertions.R * inst/tinytest/test_bulk.R: tests/bulkTest.R * inst/tinytest/test_gh_issue_56.R: tests/gh_issue_56.R * inst/tinytest/test_gh_issue_84.R: tests/gh_issue_84.R * inst/tinytest/test_gh_issues_36_51.R: tests/gh_issues_36_51.R 2019-06-06 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_all_formats.R: From tests/testAllFormats.R * inst/tinytest/test_assertions.R: From tests/testAssertions.R * inst/tinytest/test_bulk.R: From tests/bulkTest.R * inst/tinytest/test_gh_issue_56.R: From tests/gh_issue_56.R * inst/tinytest/testSimpleTests.R: Tweaks for Travis * inst/tinytest/testValidate.R: Idem * inst/tinytest/test_gh_issue_5.R: Idem 2019-06-05 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: Added removeFormats() (also in TimeFormats) * src/RcppExports.cpp: Updated * R/RcppExports.R: Updated * man/getFornats.Rd: Updated, added removeFormats help * NAMESPACE: Export removeFormats() * inst/tinytest/testUtilities.R: Added removeFormats() and format comparison tests 2019-06-04 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * inst/tinytest/testUtilities.R: Do not add format as it persists across tests -- with thanks to Mark van der Loo for spotting this * tests/tinytest.R: Depend on tinytest 0.9.4 (on CRAN \"soon\") * src/anytime.cpp: Explicitly unset TZ variable in Rstrptime 2019-06-02 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_gh_issue_12.R: From tests/test_gh_issue_12.R * inst/tinytest/test_gh_issue_33.R: From tests/test_gh_issue_12.R 2019-05-30 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * inst/tinytest/test_gh_issue_5.R: From tests/test_gh_issue_5.R 2019-05-29 Dirk Eddelbuettel edd@debian.org * inst/tinytest/testSimpleTests.R: Converted from tests/simpleTests.R * inst/tinytest/testR_Format.R: Converted from tests/r_anytime.R * inst/tinytest/testUtilities.R: Converted from tests/utilities.R 2019-05-28 Dirk Eddelbuettel edd@debian.org * tests/tinytest.R: New test driver using tinytest * DESCRIPTION (Suggests): Added tinytest * .travis.yml (install): Install tinytest * inst/tinytest/testValidate.R: Converted from tests/validate.R 2019-04-02 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/Makevars: Added to set C++11 avoiding a compiler warning * src/Makevars.win: Idem 2018 2018-12-09 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled minor version * R/anytime.R: Add note (in roxygen code) about 'Europe/London' issue with pointers to four GH issue tickets and possible alternative. * man/anytime.Rd: Idem * src/anytime.cpp: Only if undefined, define BOOST_NO_AUTO_PTR 2018-11-29 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled minor version * tests/gh_issue_84.R: Added for apparent Fedora issue but more likely a TZ=Europe/London issue * .Rbuildignore: Added tests/gh_issue_84.R 2018-11-13 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.3 2018-11-08 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: Minor update setting Boost define * R/anytime.R: Two more #nocov tags 2018-11-07 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled minor version * vignettes/anytime-introduction.Rmd: Restore vignette to vignettes/ directory as builds succeed on Windows after several small changes * inst/doc/anytime-introduction.pdf: Removed * .Rbuildignore: Exclude vignettes/ directory * README.md: Update showing use of anydate() on integer (and alike) input correponding to the 0.3.0 release heuristic change * man/anytime-package.Rd: Idem 2018-11-05 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.2 * inst/doc/anytime-introduction.pdf: Include prebuilt * .Rbuildignore: Exclude vignettes/ directory 2018-11-04 Dirk Eddelbuettel edd@debian.org * tests/simpleTests.R: Disable two some tests * src/anytime.cpp (ptToDouble): Small Windows refinement for DST adjustment 2018-11-01 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * vignettes/anytime-introduction.Rmd: Updated and extended 2018-09-02 Dirk Eddelbuettel edd@debian.org * .travis.yml: Switch Travis CI to R 3.5 repo 2018-08-30 Dirk Eddelbuettel edd@debian.org * tests/allFormats.R: Do not test on Solaris * tests/bulkTest.R: Idem * tests/simpleTests.R: Idem * vignettes/anytime-introduction.Rmd: Vignette setup tweaks * cleanup: Idem * DESCRIPTION: Add VignetteBuilder: fields 2018-08-29 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (r_stringToTime, anytime_cpp): Two uses each of Rcpp::Shield<> to make rchk happy 2018-08-19 Dirk Eddelbuettel edd@debian.org * tests/simpleTests.R: Added tests for anydate from POSIXt * R/assertions.R: Add '#nocov' tags 2018-08-07 Dirk Eddelbuettel edd@debian.org * vignettes/anytime-introduction.Rmd: More content 2018-07-07 Dirk Eddelbuettel edd@debian.org * vignettes/anytime-introduction.Rmd: Initial commit * DESCRIPTION (Suggests): Added 'knitr, rmarkdown, pinp' * .travis.yml (install): Also install r-cran-pinp and its imports 2018-07-03 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.1 2017 2017-10-11 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled minor version * tests/simpleTests.R: Additional test for yyyymmdd() 2017-10-10 Dirk Eddelbuettel edd@debian.org * R/formats.R: Added yyyymmdd() converter even though it represents a truly terrible format * man/iso8601.Rd: Added documentation 2017-10-09 Dirk Eddelbuettel edd@debian.org * tests/simpleTests.R: Additional test for anydate from integer 2017-10-08 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled minor version * NAMESPACE: Export assertDate and assertTime * tests/assertions.R: Added simple tests 2017-10-07 Dirk Eddelbuettel edd@debian.org * man/assertDate.Rd: Added documentation * tests/assertions.R (assertDate, assertTime): Idem 2017-10-06 Dirk Eddelbuettel edd@debian.org * R/assertions.R (assertDate, assertTime): First drafts 2017-06-24 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (anytime_cpp): Clone numeric inputs to preserve 2017-06-05 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.0 * README.md: Use alternate for img.shields.io GPL-2+ badge 2017-05-29 Dirk Eddelbuettel edd@debian.org * src/RcppExports.cpp (R_init_anytime): Registration now here * src/init.c: Deleted as calls now made in RcppExports.cpp * R/RcppExports.R: Updated by Rcpp 0.12.11 as well 2017-05-12 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: Numeric input now always interpreted as offset to epoch, with 'anytime()' and 'anydate()' working more consistently * R/anytime.R: Document new 'oldHeuristic' option to re-enable old behaviour. * man/anytime.Rd: Idem * tests/simpleTests.R: Adjust for new behaviour, ie use oldHeuristic=TRUE 2017-04-15 Dirk Eddelbuettel edd@debian.org * R/init.R (.onLoad): Typo fix 2017-04-02 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Date, Version): Roll minor version * src/anytime.cpp (r_anytime_cpp): Adding support for parsing functionality from the C API for R via package RApiDatetime * .editorconfig: Adding editorconfig supprt * .travis.yml (install): Add r-cran-rapidatetime 2017-03-31 Dirk Eddelbuettel edd@debian.org * R/init.R (.onLoad): The 'isRStudio' test has been refined to allow RStudio versions 1.1.129 or later which no longer conflict with Boost * R/anytime.R (testFormat, testOutput): Message reworded 2017-03-21 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.2.2 * src/init.c (R_init_anytime): Call R_registerRoutines() and R_useDynamicSymbols() * src/anytime.cpp (setMaxIntAsDate): Added setter accessible via ::: (setMaxIntAsYYYYMMDD): Made return type void 2017-03-20 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (anytime_cpp): Minor refactoring 2017-03-18 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (anytime_cpp): Another special case covering numeric values in the possible range of Dates now returned as Dates * tests/simpleTests.R: Additional (simple) tests 2017-03-05 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (convertToTime): Special case for Europe/London post 1971-10-31 02:00 (setInitialTZ): New helper function to store initial setup time zone * R/init.R (.onLoad): Register initial setup timezone used by Boost code * tests/gh_issues_36_51.R: New illustration for #36 and #51 2017-02-26 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (anytime_cpp): Convert large integer values in the range of POSIXct values as well (whereas before only eg 20101112L worked) (setMaxIntAsYYYYMMDD): New (unexported but R-accessible) helper to set the cutoff value, leaving default at 29991231 * tests/gh_issue_56.R: Added simple test script 2017-02-09 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.2.1 * R/anytime.R (anydate, utcdate): If converting from POSIXt, also use timezone argument 2017-02-04 Dirk Eddelbuettel edd@max.eddelbuettel.com * src/anytime.cpp (sformats[]): Add format with to-be-skipped timezone string now parsing 'Thu Sep 01 10:11:12 CDT 2016' * tests/allFormats.R: Added test for new format 2017-02-03 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * R/anytime.R (anydate, utcdate): Convert factor or ordered if needed * tests/simpleTests.R: New tests for anydate(), utcdate() and factors * R/init.R (.onLoad): Minor editing / refactoring * .travis.yml (before_install): Use https for curl fetch 2017-01-22 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Date, Version): Roll minor version * src/anytime.cpp (convertToTime): Use Rcpp's new Date(time)Vector * DESCRIPTION: Versioned Imports and LinkingTo 'Rcpp (>= 0.12.9), use versioned Depends 'R (>= 3.2.0) to ensure versioned LinkingTo 2016 2016-12-24 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Date, Version): Release 0.2.0 * inst/NEWS.Rd: Finalized for release * test/bulkTest.R: New set of tests 2016-12-23 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Date, Version): Roll minor version * R/formats.R (iso8601, rfc2822, rfc3339): New helper functions * man/iso8601.Rd: New documentation for the new functions * NAMESPACE: Exporting new functions * tests/simpleTests.R: New simple tests * tests/gh_issue_5.R: Skip two tests if on Windows 2016-12-22 Dirk Eddelbuettel edd@debian.org * R/anytime.R (anydate, utcdate): Ensure Date object is returned 2016-12-21 Dirk Eddelbuettel edd@debian.org * tests/simpleTests.R: More tests * tests/gh_issue_5.R: Idem 2016-12-20 Dirk Eddelbuettel edd@debian.org * tests/allFormats.R: Significantly increased number of tests 2016-12-19 Dirk Eddelbuettel edd@debian.org * tests/bulkTest.R: Improved testing for POSIXct and Date * tests/gh_issue_12.R: Additional testing 2016-12-18 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version and date * src/anytime.cpp (anytime_cpp): New option asDate (convertToTime): Idem (stringToTime): Idem (ptToDoubleUTC): Idem (ptToDouble): Idem * R/anytime.R (anydate): Now calls anytime_cpp with asDate=TRUE (utcdate): Idem * tests/allFormats.R: Minor fix, additional call * tests/bulkTest.R (fullEx): New bulk formatting test 2016-12-14 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (sformats[]): Add ISO8601 format * tests/allFormats.R: Tests for ISO8601 format 2016-12-13 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.1.2 2016-12-06 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (isAtLeastGivenLengthAndAllDigits): Simplified using Boost classification and predicate use 2016-12-05 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (format): Condition only on Rcpp version * tests/utilities.R: Call anytime:::format() 2016-12-04 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll version and date * src/anytime.cpp (stringSplitter): Correct small oversight and split on actual 'spliton' argument * tests/gh_issue_33.R: Added to test most of GH issue * tests/allFormats.R: Minor edit 2016-12-03 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (stringSplitter): Split string with boost::algorithm instead of strtok which appears to fail on 64-bit windows. 2016-11-27 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.1.1 2016-11-26 Dirk Eddelbuettel edd@debian.org * tests/utilities.R: Gaming coverage metrics by adding more calls * tests/allFormats.R: Ditto * src/anytime.cpp (anytime_cpp): Condition use of Rcpp::stop() on having Rcpp 0.12.8.1 or later as 0.12.7 and 0.12.8 had a bug tickled under older g++ versions such as Ubuntu 14.04 one used by Travis CI 2016-11-25 Dirk Eddelbuettel edd@debian.org * .travis.yml (after_success): Launch coverage analysis * .codecov.yml (comment): Added * .Rbuildignore: Exclude .codecov.yml * README.md: Added code coverage badge 2016-11-19 Dirk Eddelbuettel edd@debian.org * R/anytime.R (anydate,utcdate): Check for input of class Date * src/anytime.cpp (stringSplitter): Be more defensive about input string 2016-11-07 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.1.0 * tests/validate.R: No call of stopifnot(); Windows always surprises 2016-11-06 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (sformats[]): Remove one redundant entry present twice, move one entry to related entries (convertToTime): Another special case treatment for hhmmss * tests/allFormats.R: Align with current formats 2016-11-05 Bob Jansen bobjansen@gmail.com * src/anytime.cpp (sformats[]): Add one 'no-separator' format 2016-11-05 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (sformats[]): Add fractional seconds to four more datetimes, also add one missing format; (isAtLeastGivenLengthAndAllDigits): Another refinement, and generalized; (setDebug): add simple debug routine 2016-11-04 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (convertToTime): Add logic to cope with the extended 'yyyymmdd hhmm[ss[.fff]]' format which needs treatment before parsing * tests/allFormats.R: Added tests 2016-10-30 Dirk Eddelbuettel edd@debian.org * R/anytime.R (testOutput): New simple (unexported) string output function * src/anytime.cpp (testOutput_impl): Implementation 2016-10-24 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version): Rolled version and date * R/anytime.R (testFormat): New layer around testFormat_impl testing for RStudio * src/anytime.cpp (testFormat_impl): Renamed from testFormat * R/utils.R (isRStudio): New helper function * R/init.R (.onLoad): At startup, check if we are inside RStudio 2016-10-23 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (sformats[]): New format for RFC 822 style date * tests/allFormats.R: New test * tests/validate.R: Added test for utcparse via stopifnot() 2016-10-22 Dirk Eddelbuettel edd@debian.org * NAMESPACE: Adding utctime() and utcdate() to export() * R/anytime.R: Expanded documentation in Notes section (also merging the Issues section in); expand documentation of the tz argument; expanded examples * man/anytime.Rd: Ditto * R/utils.R (setTZ): New (unexported) helper function 2016-10-21 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (anytime_cpp): New option asUTC (defaulting to false) which governs whether parsing is as localtime or UTC (ptToDoubleUTC): New UTC conversion of ptime to double (stringToTime): Dispatch to either ptToDouble or ptToDoubleUTC * R/anytime.R (anytime): Document new option asUTC; add and document new callers utctime() and utcdate() * man/anytime.Rd: Document new options and functions 2016-10-20 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.0.4 2016-10-19 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (anytime_cpp): Also recognise as.numeric() conversions of POSIXt objects * R/anytime.R: Expand manual page text with section on Issues, correct working on Notes. * man/anytime.Rd: Ditto * tests/allFormats.R: Additional tests * README.md: Reformated code display slightly 2016-10-17 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (convertToTime): Process non-finite values as well and return NA * R/init.R (.onLoad): Also test for NA to invoke gettz, and test for NA and NULL before using fallback of UTC (with warning) 2016-10-15 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (convertToTime): Templated conversion avoids UBSAN on a temporary object created from SEXP; renamed from anytime_impl * cleanup: New helper script 2016-10-14 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (sformats[]): Add several new date(time) formats of the 14OCT2016 variety, with and without hours/minutes * tests/allFormats.R: Add new tests as well 2016-10-13 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.0.3 * R/anytime.R: Added extra comment to help page * tests/gh_issue_12.R: Small test for #12 2016-10-10 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (ptToDouble): Do not access tm_isdst on Windows for dates earlier than the epoch (bug report #12) 2016-10-08 Dirk Eddelbuettel edd@debian.org * .travis.yml (install): Added 2016-09-17 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (testFormat): Added (non-exported) helper function to test one format on one input (and timezone) (ptToDouble): Factored function now called from two places 2016-09-15 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.0.2 * inst/NEWS.Rd: Ditto 2016-09-14 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version and date * DESCRIPTION (Imports): Relax min. version costraint on Rcpp * NAMESPACE: Make getFormats() and addFormat() public * src/anytime.cpp: Added documentation for new functions getFormats() and addFormats() * man/getFormats.Rd: Ditto * man/anytime-package.Rd: Mention getFormats() and addFormats() * inst/NEWS.Rd: Added * tests/validate.R: Loosen test removing stopifnot * R/anytime.R (anydate): Call as.POSIXlt() before calling as.Date() to ensure all sub-components of the tm structure are set (GH #4) * tests/gh_issue_5.R: test case 2016-09-13 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled to (interim) version 0.0.1.1 * DESCRIPTION (Title, Description): Edited to mention anydate() * src/anytime.cpp: Refactored so that formats are now simple string kept in vector (from which locales are built in the ctor of a simple container class); now new formats can be added (at the front); formats get be retrieved as well * README.md: Add badges and CRAN installation note 2016-09-12 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.0.1 * DESCRIPTION (URL, BugReports): Added * src/anytime.cpp (anytime_cpp): Remove roxygen chunk * R/anytime.R (anytime): Add roxygen chunk * man/anytime.Rd: New file (replacing man/anytime_cpp.Rd) * NAMESPACE: Do not export anytime_cpp * R/anytime.R: Add copyright header * R/utils.R: Ditto * R/init.R: Ditto 2016-09-11 Dirk Eddelbuettel edd@debian.org * R/anytime.R (anydate): New function reducing to Date * R/anytime.R (anytime): Support factors on input * src/anytime.cpp: Extended format list, corrected one special case, document 'anydate' and add roxygen alias, remove some unused code useful only for comparison, added Notesrcp: section with some caveats * NAMESPACE: Export anydate * tests/simpleTests.R: Expanded * tests/simpleTests.Rout.save: Initially added for proper comparison, deactivated in package as local format make fixed comparison difficult * tests/allFormats.R: Added test of all formats * tests/simpleTests.Rout.save: Initially added for proper comparison, deactivated in package as local format make fixed comparison difficult * tests/validate.R: Added, full-cycle conversion + comparison with R * man/anytime-package.Rd: Rewritten and expanded * .Rbuildignore: Do not include *.Rout.save files as default format method will fall back to local time which we cannot override 2016-09-10 Dirk Eddelbuettel edd@debian.org * R/init.R (.onLoad): Use Sys.timezone(), and gettz::gettz() if available and needed, to gather and cache timezone value * R/utils.R (getTZ): New helper function to get cached TZ value * R/anytime.R (anytime): Use getTZ() to get default value * tests/simpleTests.R: Use getTZ(), some extensions * src/anytime.cpp: small tweaks to formats * README.md: Added 2016-09-09 Dirk Eddelbuettel edd@debian.org * .travis.yml: Added, using run.sh from Travis CI 2016-09-08 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (cToPOSIXct): no longer exported; (charToPOSIXct): Safer assignment for string, no longer export; * man/charToPOSIXct.Rd: Removed * man/cToPOSIXct.Rd: Ditto 2016-09-07 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: Updated and expanded help texts * man/cToPOSIXct.Rd: Ditto * man/charToPOSIXct.Rd: Ditto * tests/simpleTests.R: Some first (and simple) tests 2016-09-06 Dirk Eddelbuettel edd@debian.org * R/anytime.R: Front-end R function testing for Date or POSIXt before dispatching to C++-based converter * DESCRIPTION (Package): First commit, using a set of files which originated with the RcppBDT package","title":"Changelog"},{"location":"changelog/#2023","text":"2023-09-13 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (convertToTime): Warn if NA values resulting from conversion to character (and only one warning will be give) * R/anytime.R: Updated docs * man/anytime.Rd: Idem 2023-09-09 Dirk Eddelbuettel edd@debian.org * tests/tinytest.R: Simplified 2023-04-17 Dirk Eddelbuettel edd@debian.org * src/Makevars: Delete unneeded filed * src/Makevars.win: Idem 2023-02-04 Dirk Eddelbuettel edd@debian.org * src/Makevars: No longer set a C++ standard * src/Makevars.win: Idem 2023-02-01 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version and date * src/Makevars (CXX_STD): Set C++ standard to C++17 * src/Makevars.win (CXX_STD): Idem * src/anytime.cpp: Set include header to Rcpp/Lightest * inst/NEWS.Rd: Update NEWS.Rd * cleanup: Remove src/symbols.rds 2023-01-14 Dirk Eddelbuettel edd@debian.org * README.md: Correct URL for codecov.io badge","title":"2023"},{"location":"changelog/#2022","text":"2022-12-11 Dirk Eddelbuettel edd@debian.org * README.md: Update one URL * R/formats.R: Update URL to RFC3339 * man/iso8601.Rd: Idem 2022-10-31 Dirk Eddelbuettel edd@debian.org * .github/workflows/ci.yaml (jobs): Update to actions/checkout@v3 2022-01-25 Dirk Eddelbuettel edd@debian.org * README.md: Add total downloads badge","title":"2022"},{"location":"changelog/#2021","text":"2021-11-04 Dirk Eddelbuettel edd@debian.org * README.md: Remove Travis badge * .travis.yml: Remove Travis YAML config 2021-06-09 Dirk Eddelbuettel edd@debian.org * anytime.Rproj: Removed 2021-06-07 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (sformats): Support additional formats that are dot-sepatated such as '%Y.%m.%d' and variants * R/anytime.R: Add a 'see also' link to 'getFormats' * man/anytime.Rd: Ditto 2021-03-28 Dirk Eddelbuettel edd@debian.org * docs/mkdmt-src/: Moved mkdocs-material input 2021-03-19 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (URL): List GitHub repo and package page 2021-03-03 Dirk Eddelbuettel edd@debian.org * .editorconfig: Added * README.md: Expanded list of packages using anytime 2021-03-02 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (anytime_cpp): In case of a logical input vector, error out with message * inst/tinytest/test_all_formats.R: Add simple tests","title":"2021"},{"location":"changelog/#2020","text":"2020-12-30 Dirk Eddelbuettel edd@debian.org * .github/workflows/ci.yaml: Rename job from build to ci 2020-12-24 Dirk Eddelbuettel edd@debian.org * .github/workflows/ci.yaml: Small tweaks to CI YAML file 2020-12-10 Dirk Eddelbuettel edd@debian.org * .github/workflows/ci.yaml: Add CI runner using r-ci * README.md: Add new CI badge 2020-11-21 Dirk Eddelbuettel edd@debian.org * .travis.yml: Use renamed r-ci repository URL 2020-11-18 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * .travis.yml: Switch to focal and bspm, activate macOS build * inst/tinytest/test_all_formats.R: untabify a section 2020-10-25 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_simple.R: Reactivate tests with added check.tzone=FALSE 2020-09-12 Dirk Eddelbuettel edd@debian.org * docs/: Added package website * docs-src/: Added package website inputs * README.md: Added badge and short paragraph linking to documentation 2020-08-26 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.9 * inst/tinytest/test_simple.R: Giving up on CRAN as timezone attributes are inconsistently set between machines * R/anytime.R: Change http:// to https:// * man/anytime.Rd: Idem * man/anytime-package.Rd: Idem * README.md: Idem 2020-07-23 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.8 2020-07-22 Dirk Eddelbuettel edd@debian.org * tests/tinytest.R: No longer call tests in parallel 2020-07-20 Dirk Eddelbuettel edd@debian.org * .travis.yml: Switch to 'bionic' and R 4.0.* 2020-07-12 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * R/init.R: Support OS detection for some flavours of Linux, add predicates to test e.g. .isUbuntu() vs .isFedora() * NAMESPACE: Import utils::read.table() for this * inst/tinytest/test_simple.R: Also skip if on Fedora as the CRAN tests apparently cannot be fixed 2020-04-14 Dirk Eddelbuettel edd@debian.org * README.md (tinytest): Add 'last commit' badge 2020-01-20 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.7 * cleanup: Partly rewritten to fall afoul of bashism tests 2020-01-19 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * R/anytime.R: Minor code tightening for calcUnique * inst/tinytest/test_calc_unique.R: Renamed from test_pr_110.R 2020-01-18 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_pr_110.R: New test for PR 110 * R/anytime.R: Reassert proper line-endings, add nocov tags * man/anytime.Rd: Re-run roxygenize() 2020-01-18 Stephen Froehlich s.froehlich@cablelabs.com * R/anytime.R: Add new option 'calcUnique' for more efficient processing of input with many repeated values * man/anytime.Rd: Add documentation 2020-01-10 Dirk Eddelbuettel edd@debian.org * README.md: Add another usage example","title":"2020"},{"location":"changelog/#2019","text":"2019-11-29 Dirk Eddelbuettel edd@debian.org * src/Makevars (PKG_CXXFLAGS): Use no-rtti define for Rcpp 2019-10-12 Dirk Eddelbuettel edd@debian.org * README.md: Add CRAN usage badge 2019-08-30 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * inst/tinytest/test_simple.R: Add new 'isStupid' test 2019-08-29 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.6 2019-08-24 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * DESCRIPTION: Suggests on tinytest now '(>= 1.0.0)' * tests/tinytests.R: Check for tinytest '(>= 1.0.0)' * inst/tinytest/test_simple.R: Add two more tests * vignettes/rmd/anytime-intro.Rmd: Updated * vignettes/anytime-intro.pdf: Idem 2019-08-23 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (ptToDoubleUTC): One more #nocov tag 2019-08-18 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_all_formats.R: Small refactoring 2019-08-16 Dirk Eddelbuettel edd@debian.org * DESCRIPTION: Suggests on tinytest now '(>= 0.9.6.13)' * tests/tinytest.R: Now with parallel execution and side effect * inst/tinytest/test_all_formats.R: Now uses tinytest::exit_file() * inst/tinytest/test_bulk.R: Idem * inst/tinytest/test_simple.R: Idem 2019-08-14 Dirk Eddelbuettel edd@debian.org * README.md: Add section on example uses 2019-08-12 Dirk Eddelbuettel edd@debian.org * inst/tinytest/hide/test_r_format.R: Moved as zero active tests * inst/tinytest/hide/test_gh_issues_36_51.R: Ditto 2019-08-10 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: Add missing commas in format definition * vignettes/rmd/anytime-intro.Rmd: Some more edits * vignettes/anytime-intro.pdf: Idem * vignettes/rmd/anytime.bib: Added entries 2019-08-09 Dirk Eddelbuettel edd@debian.org * inst/tinytest/hide/test_gh_issue_5.R: Temporarily moved test which upsets two of the rhub builders * inst/tinytest/hide/test_gh_issue_84.R: Ditto * inst/tinytest/hide/test_gh_issue_96.R: Ditto * inst/tinytest/hide/test_validate.R: Ditto 2019-08-07 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp: Complement existing sformats[] with '%e' variants to allow single-digit days to be parse by Boost date_time 2019-08-04 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * R/anytime.R (anytime,anydate,utcdate): Rewritten using S3 dispatch * R/formats.R (iso8601,rfc2822,rfc3339): Ditto * NAMESPACE: Register new S3 methods * inst/tinytest/test_all_formats.R: Tweaking tests to accomodate rhub * inst/tinytest/test_bulk.R: Idem * inst/tinytest/test_gh_issue_96.R: Idem * inst/tinytest/test_validate.R: Idem 2019-07-30 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (fmt): Renamed from format() to avoid clashes * src/RcppExports.cpp (_anytime_fmt): Idem * R/RcppExports.R (fmt): Idem * inst/tinytest/test_simple.R: Ditto in test use * inst/tinytest/test_all_formats.R: Idem 2019-07-29 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_simple.R: A few more simple tests 2019-07-28 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.5 * vignettes/rmd/anytime-intro.Rmd: More edits * vignettes/anytime-intro.pdf: Idem * inst/tinytest/test_gh_issue_96.R: More polish * inst/tinytest/test_useR.R: Idem * local/test_useR.R: Deactivated as it fails at Travis 2019-07-27 Dirk Eddelbuettel edd@debian.org * R/anytime.R (utctime): Account for difference to UTC when useR=TRUE * inst/tinytest/test_useR.R: New test file for useR=TRUE * inst/tinytest/test_all_formats.R: Condition a few more tests * inst/tinytest/test_gh_issue_96.R: Lower 'tol' on two tests * inst/tinytest/test_all_formats.R: Set TZ at start * inst/tinytest/test_assertions.R: Idem * inst/tinytest/test_bulk.R: Idem * inst/tinytest/test_gh_issue_100.R: Idem * inst/tinytest/test_utilities.R: Idem * vignettes/rmd/anytime-intro.Rmd: Some edits 2019-07-26 Dirk Eddelbuettel edd@debian.org * R/anytime.R (utctime, anydate, utcdate): Also use option for possible useR default * R/format.R: Documentation tweaks * man/anytime-package.Rd: Idem * man/iso8601.Rd: Idem * README.md: Idem * vignettes/rmd/anytime-introduction.Rmd: Idem 2019-07-25 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (r_stringToTime): Correct 'useR' to date conversion 2019-07-24 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * inst/tinytest/test_all_formats.R: Tweaks for Windows tests * inst/tinytest/test_bulk.R: Idem * .travis.yml (install): Simplified with two fewer required packages 2019-07-23 Dirk Eddelbuettel edd@debian.org * R/anytime.R (anytime): The useR argument can now be set via an option * man/anytime.Rd: Ditto 2019-07-21 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_r_format.R: Deactivate test as it fails on Travis 2019-07-20 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (r_stringToTime): Use Rcpp::Function to access R functionality instead of using RApiDatetime * DESCRIPTION: No longer import RApiDatetime * NAMESPACE: Idem * inst/tinytest/test_all_formats.R: Loosen Windows test restrictions * inst/tinytest/test_gh_issue_96.R: Idem 2019-07-17 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: A few minor #nocov additions * inst/tinytest/test_all_formats.R: Add test for anydate with useR 2019-07-16 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (r_stringToTime): Skip tz argument, change internal conversion logic and reflect optional asDate argument * inst/tinytest/test_r_format.R: Skip for now * inst/tinytest/test_bulk.R (fullPOSIXctEx): Set TZ once 2019-07-14 Dirk Eddelbuettel edd@debian.org * R/anytime.R: Add a paragraph warning about possibly issue on Windows due to Boost ignoring TZ (but using the tzutil program) * tests/tinytest.R: Call as utils::packageVersions() * inst/tinytest/test_all_formats.R: Idem * inst/tinytest/test_bulk.R: Idem * inst/tinytest/test_gh_issue_5.R: Idem * inst/tinytest/test_utilities.R: Idem * inst/tinytest/test_validate.R: Idem 2019-07-08 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (ptToDouble): Another debug message 2019-07-05 Dirk Eddelbuettel edd@debian.org * .travis.yml (install): Use r-cran-tinytest from PPA 2019-06-27 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version 2019-06-26 Christoph Sax christoph.sax@gmail.com * src/anytime.cpp: Correct use via Rcpp::Function imported Sys.setenv on Windows * R/anytime.R: Use all argument to anytime_cpp() * inst/tinytest/test_gh_issue_56.R: Relax Windows test constraint * inst/tinytest/test_gh_issue_84.R: Idem * inst/tinytest/test_simple.R: Idem * inst/tinytest/test_utilities.R: Idem 2019-06-23 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * inst/tinytest/test_all_formats.R: Add three tests to complete coverage * src/anytime.cpp (convertToTime): Some #nocov attributes 2019-06-18 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.4 2019-06-17 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_all_formats.R: Do not run test for releases * inst/tinytest/test_bulk.R: Idem * inst/tinytest/test_gh_issue_5.R: Idem * inst/tinytest/test_validate.R: Idem 2019-06-16 Dirk Eddelbuettel edd@debian.org * vignettes/anytime-introduction.Rnw: Vignette wrapper with tip of the hat to Mark van der Loo for his January 2019 blog post * vignettes/rmd/anytime-intro.Rmd: Moved * vignettes/rmd/anytime.bib: Idem * vignettes/rmd/anytime-intro.Rmd: Updated * vignettes/anytime-intro.pdf: Idem * vignettes/anytime-intro.pdf: Ran compactPDF(gs_quality = \"ebook\") * .codecov.yml (coverage): Make patch behaviour more quiet * inst/tinytest/test_simple.R: Test old format 2019-06-15 Dirk Eddelbuettel edd@debian.org * R/formats.R (iso8601): Switch format to ISO8601 use with T between date and time; allow option to override for old behaviour. * man/iso8601.Rd: Document new behaviour and option. 2019-06-10 Dirk Eddelbuettel edd@debian.org * README.md (tinytest): Mention post-install testing 2019-06-09 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (r_stringToTime): Use Sys.setenv() from R on Windows as the latter OS remains \"special\" * inst/tinytest/test_all_formats.R: Exempt Windows from some tests * inst/tinytest/test_bulk.R: ditto * inst/tinytest/test_gh_issue_5.R: ditto * inst/tinytest/test_gh_issue_84.R: ditto * inst/tinytest/test_r_format.R: ditto * inst/tinytest/test_simple.R: ditto * inst/tinytest/test_utilities.R: ditto * inst/tinytest/test_validate.R: ditto 2019-06-08 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_r_format.R: Renamed for consistency * inst/tinytest/test_gh_issue_33.R: Idem * inst/tinytest/test_gh_issue_12.R: Idem * inst/tinytest/test_utilities.R: Idem 2019-06-07 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_assertions.R: From tests/assertions.R * inst/tinytest/test_bulk.R: tests/bulkTest.R * inst/tinytest/test_gh_issue_56.R: tests/gh_issue_56.R * inst/tinytest/test_gh_issue_84.R: tests/gh_issue_84.R * inst/tinytest/test_gh_issues_36_51.R: tests/gh_issues_36_51.R 2019-06-06 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_all_formats.R: From tests/testAllFormats.R * inst/tinytest/test_assertions.R: From tests/testAssertions.R * inst/tinytest/test_bulk.R: From tests/bulkTest.R * inst/tinytest/test_gh_issue_56.R: From tests/gh_issue_56.R * inst/tinytest/testSimpleTests.R: Tweaks for Travis * inst/tinytest/testValidate.R: Idem * inst/tinytest/test_gh_issue_5.R: Idem 2019-06-05 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: Added removeFormats() (also in TimeFormats) * src/RcppExports.cpp: Updated * R/RcppExports.R: Updated * man/getFornats.Rd: Updated, added removeFormats help * NAMESPACE: Export removeFormats() * inst/tinytest/testUtilities.R: Added removeFormats() and format comparison tests 2019-06-04 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * inst/tinytest/testUtilities.R: Do not add format as it persists across tests -- with thanks to Mark van der Loo for spotting this * tests/tinytest.R: Depend on tinytest 0.9.4 (on CRAN \"soon\") * src/anytime.cpp: Explicitly unset TZ variable in Rstrptime 2019-06-02 Dirk Eddelbuettel edd@debian.org * inst/tinytest/test_gh_issue_12.R: From tests/test_gh_issue_12.R * inst/tinytest/test_gh_issue_33.R: From tests/test_gh_issue_12.R 2019-05-30 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * inst/tinytest/test_gh_issue_5.R: From tests/test_gh_issue_5.R 2019-05-29 Dirk Eddelbuettel edd@debian.org * inst/tinytest/testSimpleTests.R: Converted from tests/simpleTests.R * inst/tinytest/testR_Format.R: Converted from tests/r_anytime.R * inst/tinytest/testUtilities.R: Converted from tests/utilities.R 2019-05-28 Dirk Eddelbuettel edd@debian.org * tests/tinytest.R: New test driver using tinytest * DESCRIPTION (Suggests): Added tinytest * .travis.yml (install): Install tinytest * inst/tinytest/testValidate.R: Converted from tests/validate.R 2019-04-02 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/Makevars: Added to set C++11 avoiding a compiler warning * src/Makevars.win: Idem","title":"2019"},{"location":"changelog/#2018","text":"2018-12-09 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled minor version * R/anytime.R: Add note (in roxygen code) about 'Europe/London' issue with pointers to four GH issue tickets and possible alternative. * man/anytime.Rd: Idem * src/anytime.cpp: Only if undefined, define BOOST_NO_AUTO_PTR 2018-11-29 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled minor version * tests/gh_issue_84.R: Added for apparent Fedora issue but more likely a TZ=Europe/London issue * .Rbuildignore: Added tests/gh_issue_84.R 2018-11-13 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.3 2018-11-08 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: Minor update setting Boost define * R/anytime.R: Two more #nocov tags 2018-11-07 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled minor version * vignettes/anytime-introduction.Rmd: Restore vignette to vignettes/ directory as builds succeed on Windows after several small changes * inst/doc/anytime-introduction.pdf: Removed * .Rbuildignore: Exclude vignettes/ directory * README.md: Update showing use of anydate() on integer (and alike) input correponding to the 0.3.0 release heuristic change * man/anytime-package.Rd: Idem 2018-11-05 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.2 * inst/doc/anytime-introduction.pdf: Include prebuilt * .Rbuildignore: Exclude vignettes/ directory 2018-11-04 Dirk Eddelbuettel edd@debian.org * tests/simpleTests.R: Disable two some tests * src/anytime.cpp (ptToDouble): Small Windows refinement for DST adjustment 2018-11-01 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * vignettes/anytime-introduction.Rmd: Updated and extended 2018-09-02 Dirk Eddelbuettel edd@debian.org * .travis.yml: Switch Travis CI to R 3.5 repo 2018-08-30 Dirk Eddelbuettel edd@debian.org * tests/allFormats.R: Do not test on Solaris * tests/bulkTest.R: Idem * tests/simpleTests.R: Idem * vignettes/anytime-introduction.Rmd: Vignette setup tweaks * cleanup: Idem * DESCRIPTION: Add VignetteBuilder: fields 2018-08-29 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (r_stringToTime, anytime_cpp): Two uses each of Rcpp::Shield<> to make rchk happy 2018-08-19 Dirk Eddelbuettel edd@debian.org * tests/simpleTests.R: Added tests for anydate from POSIXt * R/assertions.R: Add '#nocov' tags 2018-08-07 Dirk Eddelbuettel edd@debian.org * vignettes/anytime-introduction.Rmd: More content 2018-07-07 Dirk Eddelbuettel edd@debian.org * vignettes/anytime-introduction.Rmd: Initial commit * DESCRIPTION (Suggests): Added 'knitr, rmarkdown, pinp' * .travis.yml (install): Also install r-cran-pinp and its imports 2018-07-03 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.1","title":"2018"},{"location":"changelog/#2017","text":"2017-10-11 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled minor version * tests/simpleTests.R: Additional test for yyyymmdd() 2017-10-10 Dirk Eddelbuettel edd@debian.org * R/formats.R: Added yyyymmdd() converter even though it represents a truly terrible format * man/iso8601.Rd: Added documentation 2017-10-09 Dirk Eddelbuettel edd@debian.org * tests/simpleTests.R: Additional test for anydate from integer 2017-10-08 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled minor version * NAMESPACE: Export assertDate and assertTime * tests/assertions.R: Added simple tests 2017-10-07 Dirk Eddelbuettel edd@debian.org * man/assertDate.Rd: Added documentation * tests/assertions.R (assertDate, assertTime): Idem 2017-10-06 Dirk Eddelbuettel edd@debian.org * R/assertions.R (assertDate, assertTime): First drafts 2017-06-24 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (anytime_cpp): Clone numeric inputs to preserve 2017-06-05 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.3.0 * README.md: Use alternate for img.shields.io GPL-2+ badge 2017-05-29 Dirk Eddelbuettel edd@debian.org * src/RcppExports.cpp (R_init_anytime): Registration now here * src/init.c: Deleted as calls now made in RcppExports.cpp * R/RcppExports.R: Updated by Rcpp 0.12.11 as well 2017-05-12 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: Numeric input now always interpreted as offset to epoch, with 'anytime()' and 'anydate()' working more consistently * R/anytime.R: Document new 'oldHeuristic' option to re-enable old behaviour. * man/anytime.Rd: Idem * tests/simpleTests.R: Adjust for new behaviour, ie use oldHeuristic=TRUE 2017-04-15 Dirk Eddelbuettel edd@debian.org * R/init.R (.onLoad): Typo fix 2017-04-02 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Date, Version): Roll minor version * src/anytime.cpp (r_anytime_cpp): Adding support for parsing functionality from the C API for R via package RApiDatetime * .editorconfig: Adding editorconfig supprt * .travis.yml (install): Add r-cran-rapidatetime 2017-03-31 Dirk Eddelbuettel edd@debian.org * R/init.R (.onLoad): The 'isRStudio' test has been refined to allow RStudio versions 1.1.129 or later which no longer conflict with Boost * R/anytime.R (testFormat, testOutput): Message reworded 2017-03-21 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.2.2 * src/init.c (R_init_anytime): Call R_registerRoutines() and R_useDynamicSymbols() * src/anytime.cpp (setMaxIntAsDate): Added setter accessible via ::: (setMaxIntAsYYYYMMDD): Made return type void 2017-03-20 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (anytime_cpp): Minor refactoring 2017-03-18 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * src/anytime.cpp (anytime_cpp): Another special case covering numeric values in the possible range of Dates now returned as Dates * tests/simpleTests.R: Additional (simple) tests 2017-03-05 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (convertToTime): Special case for Europe/London post 1971-10-31 02:00 (setInitialTZ): New helper function to store initial setup time zone * R/init.R (.onLoad): Register initial setup timezone used by Boost code * tests/gh_issues_36_51.R: New illustration for #36 and #51 2017-02-26 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (anytime_cpp): Convert large integer values in the range of POSIXct values as well (whereas before only eg 20101112L worked) (setMaxIntAsYYYYMMDD): New (unexported but R-accessible) helper to set the cutoff value, leaving default at 29991231 * tests/gh_issue_56.R: Added simple test script 2017-02-09 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.2.1 * R/anytime.R (anydate, utcdate): If converting from POSIXt, also use timezone argument 2017-02-04 Dirk Eddelbuettel edd@max.eddelbuettel.com * src/anytime.cpp (sformats[]): Add format with to-be-skipped timezone string now parsing 'Thu Sep 01 10:11:12 CDT 2016' * tests/allFormats.R: Added test for new format 2017-02-03 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version * R/anytime.R (anydate, utcdate): Convert factor or ordered if needed * tests/simpleTests.R: New tests for anydate(), utcdate() and factors * R/init.R (.onLoad): Minor editing / refactoring * .travis.yml (before_install): Use https for curl fetch 2017-01-22 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Date, Version): Roll minor version * src/anytime.cpp (convertToTime): Use Rcpp's new Date(time)Vector * DESCRIPTION: Versioned Imports and LinkingTo 'Rcpp (>= 0.12.9), use versioned Depends 'R (>= 3.2.0) to ensure versioned LinkingTo","title":"2017"},{"location":"changelog/#2016","text":"2016-12-24 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Date, Version): Release 0.2.0 * inst/NEWS.Rd: Finalized for release * test/bulkTest.R: New set of tests 2016-12-23 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Date, Version): Roll minor version * R/formats.R (iso8601, rfc2822, rfc3339): New helper functions * man/iso8601.Rd: New documentation for the new functions * NAMESPACE: Exporting new functions * tests/simpleTests.R: New simple tests * tests/gh_issue_5.R: Skip two tests if on Windows 2016-12-22 Dirk Eddelbuettel edd@debian.org * R/anytime.R (anydate, utcdate): Ensure Date object is returned 2016-12-21 Dirk Eddelbuettel edd@debian.org * tests/simpleTests.R: More tests * tests/gh_issue_5.R: Idem 2016-12-20 Dirk Eddelbuettel edd@debian.org * tests/allFormats.R: Significantly increased number of tests 2016-12-19 Dirk Eddelbuettel edd@debian.org * tests/bulkTest.R: Improved testing for POSIXct and Date * tests/gh_issue_12.R: Additional testing 2016-12-18 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version and date * src/anytime.cpp (anytime_cpp): New option asDate (convertToTime): Idem (stringToTime): Idem (ptToDoubleUTC): Idem (ptToDouble): Idem * R/anytime.R (anydate): Now calls anytime_cpp with asDate=TRUE (utcdate): Idem * tests/allFormats.R: Minor fix, additional call * tests/bulkTest.R (fullEx): New bulk formatting test 2016-12-14 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (sformats[]): Add ISO8601 format * tests/allFormats.R: Tests for ISO8601 format 2016-12-13 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.1.2 2016-12-06 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (isAtLeastGivenLengthAndAllDigits): Simplified using Boost classification and predicate use 2016-12-05 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (format): Condition only on Rcpp version * tests/utilities.R: Call anytime:::format() 2016-12-04 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll version and date * src/anytime.cpp (stringSplitter): Correct small oversight and split on actual 'spliton' argument * tests/gh_issue_33.R: Added to test most of GH issue * tests/allFormats.R: Minor edit 2016-12-03 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (stringSplitter): Split string with boost::algorithm instead of strtok which appears to fail on 64-bit windows. 2016-11-27 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.1.1 2016-11-26 Dirk Eddelbuettel edd@debian.org * tests/utilities.R: Gaming coverage metrics by adding more calls * tests/allFormats.R: Ditto * src/anytime.cpp (anytime_cpp): Condition use of Rcpp::stop() on having Rcpp 0.12.8.1 or later as 0.12.7 and 0.12.8 had a bug tickled under older g++ versions such as Ubuntu 14.04 one used by Travis CI 2016-11-25 Dirk Eddelbuettel edd@debian.org * .travis.yml (after_success): Launch coverage analysis * .codecov.yml (comment): Added * .Rbuildignore: Exclude .codecov.yml * README.md: Added code coverage badge 2016-11-19 Dirk Eddelbuettel edd@debian.org * R/anytime.R (anydate,utcdate): Check for input of class Date * src/anytime.cpp (stringSplitter): Be more defensive about input string 2016-11-07 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.1.0 * tests/validate.R: No call of stopifnot(); Windows always surprises 2016-11-06 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (sformats[]): Remove one redundant entry present twice, move one entry to related entries (convertToTime): Another special case treatment for hhmmss * tests/allFormats.R: Align with current formats 2016-11-05 Bob Jansen bobjansen@gmail.com * src/anytime.cpp (sformats[]): Add one 'no-separator' format 2016-11-05 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (sformats[]): Add fractional seconds to four more datetimes, also add one missing format; (isAtLeastGivenLengthAndAllDigits): Another refinement, and generalized; (setDebug): add simple debug routine 2016-11-04 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (convertToTime): Add logic to cope with the extended 'yyyymmdd hhmm[ss[.fff]]' format which needs treatment before parsing * tests/allFormats.R: Added tests 2016-10-30 Dirk Eddelbuettel edd@debian.org * R/anytime.R (testOutput): New simple (unexported) string output function * src/anytime.cpp (testOutput_impl): Implementation 2016-10-24 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version): Rolled version and date * R/anytime.R (testFormat): New layer around testFormat_impl testing for RStudio * src/anytime.cpp (testFormat_impl): Renamed from testFormat * R/utils.R (isRStudio): New helper function * R/init.R (.onLoad): At startup, check if we are inside RStudio 2016-10-23 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (sformats[]): New format for RFC 822 style date * tests/allFormats.R: New test * tests/validate.R: Added test for utcparse via stopifnot() 2016-10-22 Dirk Eddelbuettel edd@debian.org * NAMESPACE: Adding utctime() and utcdate() to export() * R/anytime.R: Expanded documentation in Notes section (also merging the Issues section in); expand documentation of the tz argument; expanded examples * man/anytime.Rd: Ditto * R/utils.R (setTZ): New (unexported) helper function 2016-10-21 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (anytime_cpp): New option asUTC (defaulting to false) which governs whether parsing is as localtime or UTC (ptToDoubleUTC): New UTC conversion of ptime to double (stringToTime): Dispatch to either ptToDouble or ptToDoubleUTC * R/anytime.R (anytime): Document new option asUTC; add and document new callers utctime() and utcdate() * man/anytime.Rd: Document new options and functions 2016-10-20 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.0.4 2016-10-19 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (anytime_cpp): Also recognise as.numeric() conversions of POSIXt objects * R/anytime.R: Expand manual page text with section on Issues, correct working on Notes. * man/anytime.Rd: Ditto * tests/allFormats.R: Additional tests * README.md: Reformated code display slightly 2016-10-17 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (convertToTime): Process non-finite values as well and return NA * R/init.R (.onLoad): Also test for NA to invoke gettz, and test for NA and NULL before using fallback of UTC (with warning) 2016-10-15 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (convertToTime): Templated conversion avoids UBSAN on a temporary object created from SEXP; renamed from anytime_impl * cleanup: New helper script 2016-10-14 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (sformats[]): Add several new date(time) formats of the 14OCT2016 variety, with and without hours/minutes * tests/allFormats.R: Add new tests as well 2016-10-13 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.0.3 * R/anytime.R: Added extra comment to help page * tests/gh_issue_12.R: Small test for #12 2016-10-10 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (ptToDouble): Do not access tm_isdst on Windows for dates earlier than the epoch (bug report #12) 2016-10-08 Dirk Eddelbuettel edd@debian.org * .travis.yml (install): Added 2016-09-17 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (testFormat): Added (non-exported) helper function to test one format on one input (and timezone) (ptToDouble): Factored function now called from two places 2016-09-15 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.0.2 * inst/NEWS.Rd: Ditto 2016-09-14 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Roll minor version and date * DESCRIPTION (Imports): Relax min. version costraint on Rcpp * NAMESPACE: Make getFormats() and addFormat() public * src/anytime.cpp: Added documentation for new functions getFormats() and addFormats() * man/getFormats.Rd: Ditto * man/anytime-package.Rd: Mention getFormats() and addFormats() * inst/NEWS.Rd: Added * tests/validate.R: Loosen test removing stopifnot * R/anytime.R (anydate): Call as.POSIXlt() before calling as.Date() to ensure all sub-components of the tm structure are set (GH #4) * tests/gh_issue_5.R: test case 2016-09-13 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Rolled to (interim) version 0.0.1.1 * DESCRIPTION (Title, Description): Edited to mention anydate() * src/anytime.cpp: Refactored so that formats are now simple string kept in vector (from which locales are built in the ctor of a simple container class); now new formats can be added (at the front); formats get be retrieved as well * README.md: Add badges and CRAN installation note 2016-09-12 Dirk Eddelbuettel edd@debian.org * DESCRIPTION (Version, Date): Release 0.0.1 * DESCRIPTION (URL, BugReports): Added * src/anytime.cpp (anytime_cpp): Remove roxygen chunk * R/anytime.R (anytime): Add roxygen chunk * man/anytime.Rd: New file (replacing man/anytime_cpp.Rd) * NAMESPACE: Do not export anytime_cpp * R/anytime.R: Add copyright header * R/utils.R: Ditto * R/init.R: Ditto 2016-09-11 Dirk Eddelbuettel edd@debian.org * R/anytime.R (anydate): New function reducing to Date * R/anytime.R (anytime): Support factors on input * src/anytime.cpp: Extended format list, corrected one special case, document 'anydate' and add roxygen alias, remove some unused code useful only for comparison, added Notesrcp: section with some caveats * NAMESPACE: Export anydate * tests/simpleTests.R: Expanded * tests/simpleTests.Rout.save: Initially added for proper comparison, deactivated in package as local format make fixed comparison difficult * tests/allFormats.R: Added test of all formats * tests/simpleTests.Rout.save: Initially added for proper comparison, deactivated in package as local format make fixed comparison difficult * tests/validate.R: Added, full-cycle conversion + comparison with R * man/anytime-package.Rd: Rewritten and expanded * .Rbuildignore: Do not include *.Rout.save files as default format method will fall back to local time which we cannot override 2016-09-10 Dirk Eddelbuettel edd@debian.org * R/init.R (.onLoad): Use Sys.timezone(), and gettz::gettz() if available and needed, to gather and cache timezone value * R/utils.R (getTZ): New helper function to get cached TZ value * R/anytime.R (anytime): Use getTZ() to get default value * tests/simpleTests.R: Use getTZ(), some extensions * src/anytime.cpp: small tweaks to formats * README.md: Added 2016-09-09 Dirk Eddelbuettel edd@debian.org * .travis.yml: Added, using run.sh from Travis CI 2016-09-08 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp (cToPOSIXct): no longer exported; (charToPOSIXct): Safer assignment for string, no longer export; * man/charToPOSIXct.Rd: Removed * man/cToPOSIXct.Rd: Ditto 2016-09-07 Dirk Eddelbuettel edd@debian.org * src/anytime.cpp: Updated and expanded help texts * man/cToPOSIXct.Rd: Ditto * man/charToPOSIXct.Rd: Ditto * tests/simpleTests.R: Some first (and simple) tests 2016-09-06 Dirk Eddelbuettel edd@debian.org * R/anytime.R: Front-end R function testing for Date or POSIXt before dispatching to C++-based converter * DESCRIPTION (Package): First commit, using a set of files which originated with the RcppBDT package","title":"2016"},{"location":"news/","text":"News for Package anytime Version 0.3.10 (2023-xx-xx) A new documentation site was added. Continuous Integration now uses run.sh from r-ci with bspm Logical input vectors are now recognised as an error ( #121 ) Additional dot-separated format ' Other small updates were made throughout the package No longer set a C++ compilation standard as the default choices by R are sufficient for the package Switch Rcpp include file to Rcpp/Lightest We recommend ~/.R/Makevars compiler flag options -Wno-ignored-attributes -Wno-nonnull -Wno-parentheses The tinytest runner was simplified NA values from conversion now trigger a warning Version 0.3.9 (2020-08-26) Skip one test file that is impossible to run across different CRAN setups, and life is definitely too short for these games. Change remaining http:// to https:// because, well, you know. Version 0.3.8 (2020-07-23) A small utility function was added to detect the Linux distribution used in order to fine-tune tests once more. Travis now uses Ubuntu 'bionic' and R 4.0.*. Version 0.3.7 (2020-01-20) Test and possibly condition away one more test file. Small enhancement for compilation by setting no-rtti define via Rcpp. New option calcUnique for speed-up by parseing only unique timestamps (Stephen Froehlich in #110 fixing #109 ). Version 0.3.6 (2019-08-29) Added, and then removed, required file for JOSS; added 'unworthy' badge as we earned a desk reject (cf #1605 there). Renamed internal helper function format() to fmt() to avoid clashes with base::format() (Dirk in #104 ). Use S3 dispatch and generics for key functions (Dirk in #106 ). Continued to tweak tests as we find some of the rhub platform to behave strangely (Dirk via commits, #107 , and #108 ). Added %e format for single-digit day parsing by Boost (Dirk addressing at least #24 , #70 and #99 ). Expansed and updated vignette with benchmark comparisons. Updated unit tests using tinytest which remains a pleasure to use; versioned Suggests: is now '>= 1.0.0'. Version 0.3.5 (2019-07-28) Fix use of Rcpp::Function -accessed Sys.setenv() , name all arguments in call to C++ (Christoph Sax in #95 ). Relax constraint on Windows testing in several test files (Christoph Sax in #97 ). Fix an issue related to TZ environment variable setting (Dirk in #101 ). Change useR=TRUE behaviour by directly calling R via Rcpp (Dirk in #103 fixing #96 ). Several updates to unit testing files aiming for more robust behaviour across platforms. Updated documentation in manual pages, README and vignette. Version 0.3.4 (2019-06-18) Documentation was updated about a 'Europe/London' conversion issue ( #84 , inter alia). The package is now compiled under the C++11 standard. The package now uses tinytest for unit tests. The iso8601() function now places a \u2018T\u2019 between date and time; an option switches to prior format using a space. The vignette is now pre-made and included as-is in a Sweave document reducing the number of suggested packages. Version 0.3.3 (2018-11-13) Vignette build quirkyness on Windows resolved so vignette reinstated. Documentation updated showing correct use of anydate (and not anytime ) on input like \u20182016010\u2019 following the 0.3.0 release heuristic change. Set #define for Boost to make compilation more quiet. Version 0.3.2 (2018-11-05) Added a new vignette introducing the anytime package. Seemingly it cannot be compiled on Windows so included prebuilt. Some more tests for anydate were added along with so code coverage tags. The C++ code was robustified in two places to not trigger rchk warnings ( #79 ). Three unit test files which fail on Solaris are now skipping this os as we cannot reproduce or test on this OS ( #80 ). Version 0.3.1 (2018-07-03) Numeric input is now preserved rather than silently cast to the return object type ( #69 fixing #68 ). New assertion function assertDate() and assertTime() . Unit tests were expanded for the new functions, for conversion from integer as well as for yyyymmdd() . Version 0.3.0 (2017-06-05) Numeric input is now always an offset to epoch, with anytime() using seconds, and anydate() using dates. ( #65 fixing #63 ). Old behaviour can be re-enabled with an option also supporting a global setting getOption(\"anytimeOldHeuristic\") RStudio versions 1.1.129 or later can run all functions without fear of crashing due to a change in their use of Boost. Replaced init.c with registration code inside of RcppExports.cpp thanks to Rcpp 0.12.11. Version 0.2.2 (2017-03-21) Address corner case of integer-typed (large) values corresponding to POSIXct time (PR #57 closing ##56 ) Add special case for \u2018Europe/London\u2019 and 31 Oct 1971 BST change to avoid a one-hour offset error ( #58 fixing #36 and #51 ) Address another corner case of numeric values corresponding to Date types which are now returned as Date Added file init.c with calls to R_registerRoutines() and R_useDynamicSymbols() ; already used .registration=TRUE in useDynLib in NAMESPACE Version 0.2.1 (2017-02-09) The new DatetimeVector class from Rcpp is now used, and proper versioned Depends: have been added (PR #43 ) The anydate and utcdate functions convert again from factor and ordered (PR #46 closing #44 ) A format similar to RFC 28122 but with additonal timezone text can now be parsed (PR #48 closing #47 ) Conversion from POSIXt to Date now also respect the timezone (PR #50 closing #49 ) The internal .onLoad functions was updated The Travis setup uses https to fetch the run script Version 0.2.0 (2016-12-24) Added (exported) helper functions iso8601(), rfc2822() and rfc3339() to format date(time) objects according to standards Conversion to dates is now more robust thanks to improved internal processing (PR #39 closing #36 ) The ISO 8601 format is now recognised, however the timezone information is not parsed by Boost Date_Time (which is a known upstream limitation) (PR #38 closing #37 ) The 'allFormats.R' test script was significantly strengthened ( #40 ) Test scripts like 'simpleTests.R' have as also been strengthened ( #41 ); on Windows and in one file two tests need to be skipped. A new 'bulkTest.R' test script was added testing parsing against what R returns Version 0.1.2 (2016-12-13) The (internal) string processing and splitting now uses Boost algorithm functions which avoids a (bizarre) bug on Windows. ( #33 ) Test coverage was increased. Version 0.1.1 (2016-11-27) Both anydate() and utcdate() no longer attempt to convert an input value that is already of type Date . The string splitter (needed for the 'all-digits' formats extending Boost Date_time) is now more defensive about the input argument and more robust. Thanks to Bob Jansen for the heads-up (PR #30 closing issue #29 ). Code coverage reporting has been added (PR #31 ). Version 0.1.0 (2016-11-06) New functions utctime() and utcdate() were added to parse input as coordinated universal time; the functionality is also available in anytime() and anydate() via a new argument asUTC (PR #22 ) New (date)time format for RFC822-alike dates, and expanded existing datetime formats to all support fractional seconds (PR #21 ) Extended functionality to support not only \u2018YYYYMMDD\u2019 (without a separator, and not covered by Boost) but also with \u2018HHMM\u2019, \u2018HHMMSS\u2019 and \u2018HHMMSS.ffffff\u2019 (PR #30 fixing issue #29 ) Extended functionality to support \u2018HHMMSS[.ffffff]\u2019 following other date formats. Documentation and tests have been expanded; typos corrected New (unexported) helper functions setTZ , testOutput , setDebug The testFormat (and testOutput ) functions cannot be called under RStudio (PR #27 fixing issue #25 ). More robust support for non-finite values such as NA , NaN or Inf (Fixing issue #16 ) Version 0.0.4 (2016-10-20) Before converting via lexical_cast , assign to atomic type via template logic to avoid an UBSAN issue (PR #15 closing issue #14 ) More robust initialization and timezone information gathering. More robust processing of non-finite input also coping with non-finite values such as NA , NaN and Inf which all return NA Allow numeric POSIXt representation on input, also creating proper POSIXct (or, if requested, Date ) Version 0.0.3 (2016-10-13) Added (non-exported) helper function testFormat() Do not access tm_isdst on Windows for dates before the epoch (pull request #13 fixing issue #12 ); added test as well Version 0.0.2 (2016-09-15) Refactored to use a simple class wrapped around two vector with (string) formats and locales; this allow for adding formats; also adds accessor for formats ( #4 , closes #1 and #3 ). New function addFormats() and getFormats() . Relaxed one tests which showed problems on some platforms. Added as.POSIXlt() step to anydate() ensuring all POSIXlt components are set ( #6 fixing #5 ). Version 0.0.1 (2016-09-12) Initial release with anytime() and anydate","title":"News"},{"location":"vignette/","text":"Introduction to anytime","title":"Introductory Vignette"},{"location":"vignette/#introduction-to-anytime","text":"","title":"Introduction to anytime"},{"location":"man/anytime-package/","text":"Anything to 'POSIXct' or 'Date' Converter Description Convert input in any one of character, integer, numeric, factor, or ordered type into 'POSIXct' (or 'Date') objects, using one of a number of predefined formats, and relying on Boost facilities for date and time parsing. Details R excels at computing with dates, and times. Using typed representation for your data is highly recommended not only because of the functionality offered but also because of the added safety stemming from proper representation. But there is a small nuisance cost in interactive work as well as in programming. How often have we told as.POSIXct() that the origin is (of course) the epoch . Do we really have to say it again? Similarly, when parsing dates that are somewhat in YYYYMMDD format, do we really need to bother converting from integer or numeric or character or factor or ordered with one of dozen separators and/or month forms: YYYY-MM-DD, YYYY/MM/DD, YYYYMMDD, YYYY-mon-DD and so on? So there may have been a need for a general purpose converter returning a proper POSIXct (or Date ) object no matter the input (provided it was somewhat parseable). anytime() tries to be that function. The actual conversion is done by a combination of Boost lexical_cast to go from (almost) anything to string representation which is then parsed by Boost Date_Time . An alternate method using the corresponding R functions is also available as a fallback. Conversion is done by looping over a fixed set of formats until a matching one is found, or returning an error if none is found. The current set of conversion formulae is accessible in the source code , and can now also be accessed in R via getFormats() . Formats can be added and removed via the addFormats() and removeFormats{} functions. Details on the Boost date format symbols are provided by the Boost date_time documentation and similar (but not identical) to what strftime uses. Author(s) Dirk Eddelbuettel References Boost date_time: https://www.boost.org/doc/libs/1_70_0/doc/html/date_time.html Formats used: https://github.com/eddelbuettel/anytime/blob/master/src/anytime.cpp#L43-L106 Boost format documentation: https://www.boost.org/doc/libs/1_61_0/doc/html/date_time/date_time_io.html#date_time.format_flags Examples Sys.setenv(TZ=anytime:::getTZ()) ## helper function to try to get TZ options(digits.secs=6) ## for fractional seconds below library(anytime) ## load package, caches TZ information ## integer anydate(20160101L + 0:2) ## numeric anydate(20160101 + 0:2) ## factor anydate(as.factor(20160101 + 0:2)) ## ordered anydate(as.ordered(20160101 + 0:2)) ## Dates: Character anydate(as.character(20160101 + 0:2)) ## Dates: alternate formats anydate(c(\"20160101\", \"2016/01/02\", \"2016-01-03\")) ## Datetime: ISO with/without fractional seconds anytime(c(\"2016-01-01 10:11:12\", \"2016-01-01 10:11:12.345678\")) ## Datetime: ISO alternate (?) with 'T' separator anytime(c(\"20160101T101112\", \"20160101T101112.345678\")) ## Short month '%b' (and full month is supported too) anytime(c(\"2016-Sep-01 10:11:12\", \"Sep/01/2016 10:11:12\", \"Sep-01-2016 10:11:12\")) ## Datetime: Mixed format (cf https://stackoverflow.com/questions/39259184) anytime(c(\"Thu Sep 01 10:11:12 2016\", \"Thu Sep 01 10:11:12.345678 2016\"))","title":"Anytime package"},{"location":"man/anytime-package/#anything-to-posixct-or-date-converter","text":"","title":"Anything to 'POSIXct' or 'Date' Converter"},{"location":"man/anytime-package/#description","text":"Convert input in any one of character, integer, numeric, factor, or ordered type into 'POSIXct' (or 'Date') objects, using one of a number of predefined formats, and relying on Boost facilities for date and time parsing.","title":"Description"},{"location":"man/anytime-package/#details","text":"R excels at computing with dates, and times. Using typed representation for your data is highly recommended not only because of the functionality offered but also because of the added safety stemming from proper representation. But there is a small nuisance cost in interactive work as well as in programming. How often have we told as.POSIXct() that the origin is (of course) the epoch . Do we really have to say it again? Similarly, when parsing dates that are somewhat in YYYYMMDD format, do we really need to bother converting from integer or numeric or character or factor or ordered with one of dozen separators and/or month forms: YYYY-MM-DD, YYYY/MM/DD, YYYYMMDD, YYYY-mon-DD and so on? So there may have been a need for a general purpose converter returning a proper POSIXct (or Date ) object no matter the input (provided it was somewhat parseable). anytime() tries to be that function. The actual conversion is done by a combination of Boost lexical_cast to go from (almost) anything to string representation which is then parsed by Boost Date_Time . An alternate method using the corresponding R functions is also available as a fallback. Conversion is done by looping over a fixed set of formats until a matching one is found, or returning an error if none is found. The current set of conversion formulae is accessible in the source code , and can now also be accessed in R via getFormats() . Formats can be added and removed via the addFormats() and removeFormats{} functions. Details on the Boost date format symbols are provided by the Boost date_time documentation and similar (but not identical) to what strftime uses.","title":"Details"},{"location":"man/anytime-package/#authors","text":"Dirk Eddelbuettel","title":"Author(s)"},{"location":"man/anytime-package/#references","text":"Boost date_time: https://www.boost.org/doc/libs/1_70_0/doc/html/date_time.html Formats used: https://github.com/eddelbuettel/anytime/blob/master/src/anytime.cpp#L43-L106 Boost format documentation: https://www.boost.org/doc/libs/1_61_0/doc/html/date_time/date_time_io.html#date_time.format_flags","title":"References"},{"location":"man/anytime-package/#examples","text":"Sys.setenv(TZ=anytime:::getTZ()) ## helper function to try to get TZ options(digits.secs=6) ## for fractional seconds below library(anytime) ## load package, caches TZ information ## integer anydate(20160101L + 0:2) ## numeric anydate(20160101 + 0:2) ## factor anydate(as.factor(20160101 + 0:2)) ## ordered anydate(as.ordered(20160101 + 0:2)) ## Dates: Character anydate(as.character(20160101 + 0:2)) ## Dates: alternate formats anydate(c(\"20160101\", \"2016/01/02\", \"2016-01-03\")) ## Datetime: ISO with/without fractional seconds anytime(c(\"2016-01-01 10:11:12\", \"2016-01-01 10:11:12.345678\")) ## Datetime: ISO alternate (?) with 'T' separator anytime(c(\"20160101T101112\", \"20160101T101112.345678\")) ## Short month '%b' (and full month is supported too) anytime(c(\"2016-Sep-01 10:11:12\", \"Sep/01/2016 10:11:12\", \"Sep-01-2016 10:11:12\")) ## Datetime: Mixed format (cf https://stackoverflow.com/questions/39259184) anytime(c(\"Thu Sep 01 10:11:12 2016\", \"Thu Sep 01 10:11:12.345678 2016\"))","title":"Examples"},{"location":"man/anytime/","text":"Parse POSIXct or Date objects from input data Description These function use the Boost Date_Time library to parse datetimes (and dates) from strings, integers, factors or even numeric values (which are cast to strings internally). They return a vector of POSIXct objects (or Date objects in the case of anydate ). POSIXct objects represent dates and time as (possibly fractional) seconds since the \u2018epoch\u2019 of January 1, 1970. A timezone can be set, if none is supplied \u2018UTC\u2019 is set. Usage anytime(x, tz = getTZ(), asUTC = FALSE, useR = getOption(\"anytimeUseRConversions\", FALSE), oldHeuristic = getOption(\"anytimeOldHeuristic\", FALSE), calcUnique = FALSE) anydate(x, tz = getTZ(), asUTC = FALSE, useR = getOption(\"anytimeUseRConversions\", FALSE), calcUnique = FALSE) utctime(x, tz = getTZ(), useR = getOption(\"anytimeUseRConversions\", FALSE), oldHeuristic = getOption(\"anytimeOldHeuristic\", FALSE), calcUnique = FALSE) utcdate(x, tz = getTZ(), useR = getOption(\"anytimeUseRConversions\", FALSE), calcUnique = FALSE) Arguments x A vector of type character, integer or numeric with date(time) expressions to be parsed and converted. tz A string with the timezone, defaults to the result of the (internal) getTZ function if unset. The getTZ function returns the timezone values stored in local package environment, and set at package load time. Also note that this argument applies to the output : the returned object will have this timezone set. The timezone is not used for the parsing which will always be to localtime, or to UTC is the asUTC variable is set (as it is in the related functions utctime and utcdate ). So one can think of the argument as \u2018shift parsed time object to this timezone\u2019. This is similar to what format() in base R does, but our return value is still a POSIXt object instead of a character value. asUTC A logical value indicating if parsing should be to UTC; default is false implying localtime. useR A logical value indicating if conversion should be done via code from R (via Rcpp::Function ) instead of the default Boost routines. The default value is the value of the option anytimeUseRConversions with a fallback of FALSE if the option is unset. In other words, this will be false by default but can be set to true via an option. oldHeuristic A logical value to enable behaviour as in version 0.2.2 or earlier: interpret a numeric or integer value that could be seen as a YYYYMMDD as a date. If the default value FALSE is seen, then numeric values are used as offsets dates (in anydate or utcdate ), and as second offsets for datetimes otherwise. A default value can also be set via the anytimeOldHeuristic option. calcUnique A logical value with a default value of FALSE that tells the function to perform the anytime() or anydate() calculation only once for each unique value in the x vector. It results in no difference in inputs or outputs, but can result in a significant speed increases for long vectors where each timestamp appears more than once. However, it will result in a slight slow down for input vectors where each timestamp appears only once. Details A number of fixed formats are tried in succession. These include the standard ISO format \u2018YYYY-MM-DD HH:MM:SS\u2019 as well as different local variants including several forms popular in the United States. Two-digits years and clearly ambigous formats such as \u201803/04/05\u2019 are ignored. In the case of parsing failure a NA value is returned. Fractional seconds are supported as well. As R itself only supports microseconds, the Boost compile-time option for nano-second resolution has not been enabled. Value A vector of POSIXct elements, or, in the case of anydate , a vector of Date objects. Notes By default, the (internal) conversion to (fractional) seconds since the epoch is relative to the locatime of this system, and therefore not completely independent of the settings of the local system. This is to strike a balance between ease of use and functionality. A more-full featured conversion could be possibly be added with support for arbitrary reference times, but this is (at least) currently outside the scope of this package. See the RcppCCTZ package which offers some timezone-shifting and differencing functionality. As of version 0.0.5 one can also parse relative to UTC avoiding the localtime issue, Times and timezones can be tricky. This package offers a heuristic approach, it is likely that some input formats may not be parsed, or worse, be parsed incorrectly. This is not quite a Bobby Tables situation but care must always be taken with user-supplied input. The Boost Date_Time library cannot parse single digit months or days. So while \u20182016/09/02\u2019 works (as expected), \u20182016/9/2\u2019 will not. Other non-standard formats may also fail. There is a known issue (discussed at length in issue ticket 5 ) where Australian times are off by an hour. This seems to affect only Windows, not Linux. When given a vector, R will coerce it to the type of the first element. Should that be NA , surprising things can happen: c(NA, Sys.Date()) forces both values to numeric and the date will not be parsed correctly (as its integer value becomes numeric before our code sees it). On the other hand, c(Sys.Date(), NA) works as expected parsing as type Date with one missing value. See issue ticket 11 for more. Another known issue concerns conversion when the timezone is set to \u2018Europe/London\u2019, see GitHub issue tickets 36 . 51 . 59 . and 86 . As pointed out in the comment in that last one, the Sys.timezone manual page suggests several alternatives to using \u2018Europe/London\u2019 such as \u2018GB\u2019. Yet another known issue arises on Windows due to designs in the Boost library. While we can set the TZ library variable, Boost actually does not consult it but rather relies only on the (Windows) tool tzutil . This means that default behaviour should be as expected: dates and/or times are parsed to the local settings. But testing different TZ values (or more precisely, changes via the (unexported) helper function setTZ function as we cache TZ ) will only influence the behaviour on Unix or Unix-alike operating systems and not on Windows. See the discussion at issue ticket 96 for more. In short, the recommendation for Windows user is to also set useR=TRUE when setting a timezone argument. Operating System Impact On Windows systems, accessing the isdst flag on dates or times before January 1, 1970, can lead to a crash. Therefore, the lookup of this value has been disabled for those dates and times, which could therefore be off by an hour (the common value that needs to be corrected). It should not affect dates, but may affect datetime objects. Old Heuristic Up until version 0.2.2, numeric input smaller than an internal cutoff value was interpreted as a date, even if anytime() was called. While convenient, it is also inconsistent as we otherwise take numeric values to be offsets to the epoch. Newer version are consistent: for anydate , a value is taken as date offset relative to the epoch (of January 1, 1970). For anytime , it is taken as seconds offset . So anytime(60) is one minute past the epoch, and anydate(60) is sixty days past it. The old behaviour can be enabled by setting the oldHeuristic argument to anytime (and utctime ) to TRUE . Additionally, the default value can be set via getOption(\"anytimeOldHeuristic\") which can be set to TRUE in startup file. Note that all other inputs such character, factor or ordered are not affected. Warnings As of version 0.3.10, a conversion from character resulting in a NA will lead to a warning being emitted. At most one warning per call is given: should numerous unparseable values be present on input, only one warning will be show. R offers mechanism to either suppress warnings, or convert them to errors as described in the help page for options() under the entry for warn . Author(s) Dirk Eddelbuettel References This StackOverflow answer provided the initial idea: https://stackoverflow.com/a/3787188/143305 . See Also anytime-package , getFormats Examples ## See the source code for a full list of formats, and the ## or the reference in help('anytime-package') for details times <- c(\"2004-03-21 12:45:33.123456\", \"2004/03/21 12:45:33.123456\", \"20040321 124533.123456\", \"03/21/2004 12:45:33.123456\", \"03-21-2004 12:45:33.123456\", \"2004-03-21\", \"20040321\", \"03/21/2004\", \"03-21-2004\", \"20010101\") anytime(times) anydate(times) utctime(times) utcdate(times) ## show effect of tz argument anytime(\"2001-02-03 04:05:06\") ## adjust parsed time to given TZ argument anytime(\"2001-02-03 04:05:06\", tz=\"America/Los_Angeles\") ## somewhat equvalent base R functionality format(anytime(\"2001-02-03 04:05:06\"), tz=\"America/Los_Angeles\")","title":"Anytime"},{"location":"man/anytime/#parse-posixct-or-date-objects-from-input-data","text":"","title":"Parse POSIXct or Date objects from input data"},{"location":"man/anytime/#description","text":"These function use the Boost Date_Time library to parse datetimes (and dates) from strings, integers, factors or even numeric values (which are cast to strings internally). They return a vector of POSIXct objects (or Date objects in the case of anydate ). POSIXct objects represent dates and time as (possibly fractional) seconds since the \u2018epoch\u2019 of January 1, 1970. A timezone can be set, if none is supplied \u2018UTC\u2019 is set.","title":"Description"},{"location":"man/anytime/#usage","text":"anytime(x, tz = getTZ(), asUTC = FALSE, useR = getOption(\"anytimeUseRConversions\", FALSE), oldHeuristic = getOption(\"anytimeOldHeuristic\", FALSE), calcUnique = FALSE) anydate(x, tz = getTZ(), asUTC = FALSE, useR = getOption(\"anytimeUseRConversions\", FALSE), calcUnique = FALSE) utctime(x, tz = getTZ(), useR = getOption(\"anytimeUseRConversions\", FALSE), oldHeuristic = getOption(\"anytimeOldHeuristic\", FALSE), calcUnique = FALSE) utcdate(x, tz = getTZ(), useR = getOption(\"anytimeUseRConversions\", FALSE), calcUnique = FALSE)","title":"Usage"},{"location":"man/anytime/#arguments","text":"x A vector of type character, integer or numeric with date(time) expressions to be parsed and converted. tz A string with the timezone, defaults to the result of the (internal) getTZ function if unset. The getTZ function returns the timezone values stored in local package environment, and set at package load time. Also note that this argument applies to the output : the returned object will have this timezone set. The timezone is not used for the parsing which will always be to localtime, or to UTC is the asUTC variable is set (as it is in the related functions utctime and utcdate ). So one can think of the argument as \u2018shift parsed time object to this timezone\u2019. This is similar to what format() in base R does, but our return value is still a POSIXt object instead of a character value. asUTC A logical value indicating if parsing should be to UTC; default is false implying localtime. useR A logical value indicating if conversion should be done via code from R (via Rcpp::Function ) instead of the default Boost routines. The default value is the value of the option anytimeUseRConversions with a fallback of FALSE if the option is unset. In other words, this will be false by default but can be set to true via an option. oldHeuristic A logical value to enable behaviour as in version 0.2.2 or earlier: interpret a numeric or integer value that could be seen as a YYYYMMDD as a date. If the default value FALSE is seen, then numeric values are used as offsets dates (in anydate or utcdate ), and as second offsets for datetimes otherwise. A default value can also be set via the anytimeOldHeuristic option. calcUnique A logical value with a default value of FALSE that tells the function to perform the anytime() or anydate() calculation only once for each unique value in the x vector. It results in no difference in inputs or outputs, but can result in a significant speed increases for long vectors where each timestamp appears more than once. However, it will result in a slight slow down for input vectors where each timestamp appears only once.","title":"Arguments"},{"location":"man/anytime/#details","text":"A number of fixed formats are tried in succession. These include the standard ISO format \u2018YYYY-MM-DD HH:MM:SS\u2019 as well as different local variants including several forms popular in the United States. Two-digits years and clearly ambigous formats such as \u201803/04/05\u2019 are ignored. In the case of parsing failure a NA value is returned. Fractional seconds are supported as well. As R itself only supports microseconds, the Boost compile-time option for nano-second resolution has not been enabled.","title":"Details"},{"location":"man/anytime/#value","text":"A vector of POSIXct elements, or, in the case of anydate , a vector of Date objects.","title":"Value"},{"location":"man/anytime/#notes","text":"By default, the (internal) conversion to (fractional) seconds since the epoch is relative to the locatime of this system, and therefore not completely independent of the settings of the local system. This is to strike a balance between ease of use and functionality. A more-full featured conversion could be possibly be added with support for arbitrary reference times, but this is (at least) currently outside the scope of this package. See the RcppCCTZ package which offers some timezone-shifting and differencing functionality. As of version 0.0.5 one can also parse relative to UTC avoiding the localtime issue, Times and timezones can be tricky. This package offers a heuristic approach, it is likely that some input formats may not be parsed, or worse, be parsed incorrectly. This is not quite a Bobby Tables situation but care must always be taken with user-supplied input. The Boost Date_Time library cannot parse single digit months or days. So while \u20182016/09/02\u2019 works (as expected), \u20182016/9/2\u2019 will not. Other non-standard formats may also fail. There is a known issue (discussed at length in issue ticket 5 ) where Australian times are off by an hour. This seems to affect only Windows, not Linux. When given a vector, R will coerce it to the type of the first element. Should that be NA , surprising things can happen: c(NA, Sys.Date()) forces both values to numeric and the date will not be parsed correctly (as its integer value becomes numeric before our code sees it). On the other hand, c(Sys.Date(), NA) works as expected parsing as type Date with one missing value. See issue ticket 11 for more. Another known issue concerns conversion when the timezone is set to \u2018Europe/London\u2019, see GitHub issue tickets 36 . 51 . 59 . and 86 . As pointed out in the comment in that last one, the Sys.timezone manual page suggests several alternatives to using \u2018Europe/London\u2019 such as \u2018GB\u2019. Yet another known issue arises on Windows due to designs in the Boost library. While we can set the TZ library variable, Boost actually does not consult it but rather relies only on the (Windows) tool tzutil . This means that default behaviour should be as expected: dates and/or times are parsed to the local settings. But testing different TZ values (or more precisely, changes via the (unexported) helper function setTZ function as we cache TZ ) will only influence the behaviour on Unix or Unix-alike operating systems and not on Windows. See the discussion at issue ticket 96 for more. In short, the recommendation for Windows user is to also set useR=TRUE when setting a timezone argument.","title":"Notes"},{"location":"man/anytime/#operating-system-impact","text":"On Windows systems, accessing the isdst flag on dates or times before January 1, 1970, can lead to a crash. Therefore, the lookup of this value has been disabled for those dates and times, which could therefore be off by an hour (the common value that needs to be corrected). It should not affect dates, but may affect datetime objects.","title":"Operating System Impact"},{"location":"man/anytime/#old-heuristic","text":"Up until version 0.2.2, numeric input smaller than an internal cutoff value was interpreted as a date, even if anytime() was called. While convenient, it is also inconsistent as we otherwise take numeric values to be offsets to the epoch. Newer version are consistent: for anydate , a value is taken as date offset relative to the epoch (of January 1, 1970). For anytime , it is taken as seconds offset . So anytime(60) is one minute past the epoch, and anydate(60) is sixty days past it. The old behaviour can be enabled by setting the oldHeuristic argument to anytime (and utctime ) to TRUE . Additionally, the default value can be set via getOption(\"anytimeOldHeuristic\") which can be set to TRUE in startup file. Note that all other inputs such character, factor or ordered are not affected.","title":"Old Heuristic"},{"location":"man/anytime/#warnings","text":"As of version 0.3.10, a conversion from character resulting in a NA will lead to a warning being emitted. At most one warning per call is given: should numerous unparseable values be present on input, only one warning will be show. R offers mechanism to either suppress warnings, or convert them to errors as described in the help page for options() under the entry for warn .","title":"Warnings"},{"location":"man/anytime/#authors","text":"Dirk Eddelbuettel","title":"Author(s)"},{"location":"man/anytime/#references","text":"This StackOverflow answer provided the initial idea: https://stackoverflow.com/a/3787188/143305 .","title":"References"},{"location":"man/anytime/#see-also","text":"anytime-package , getFormats","title":"See Also"},{"location":"man/anytime/#examples","text":"## See the source code for a full list of formats, and the ## or the reference in help('anytime-package') for details times <- c(\"2004-03-21 12:45:33.123456\", \"2004/03/21 12:45:33.123456\", \"20040321 124533.123456\", \"03/21/2004 12:45:33.123456\", \"03-21-2004 12:45:33.123456\", \"2004-03-21\", \"20040321\", \"03/21/2004\", \"03-21-2004\", \"20010101\") anytime(times) anydate(times) utctime(times) utcdate(times) ## show effect of tz argument anytime(\"2001-02-03 04:05:06\") ## adjust parsed time to given TZ argument anytime(\"2001-02-03 04:05:06\", tz=\"America/Los_Angeles\") ## somewhat equvalent base R functionality format(anytime(\"2001-02-03 04:05:06\"), tz=\"America/Los_Angeles\")","title":"Examples"},{"location":"man/assertDate/","text":"Convert to Date (or POSIXct) and assert successful conversion Description Converts its input to type Date (or POSIXct ), and asserts that the content is in fact of suitable type by checking for remaining NA Usage assertDate(x) assertTime(x) Arguments x An input object suitable for anydate or anytime Details Note that these functions just check for NA and cannot check for semantic correctness. Value A vector of Date or POSIXct objects. As a side effect, an error will be thrown in any of the input was not convertible. Author(s) Dirk Eddelbuettel Examples assertDate(c(\"2001/02/03\", \"2001-02-03\", \"20010203\")) assertTime(c(\"2001/02/03 04:05:06\", \"2001-02-03 04:05:06\", \"20010203 040506\"))","title":"assertDate"},{"location":"man/assertDate/#convert-to-date-or-posixct-and-assert-successful-conversion","text":"","title":"Convert to Date (or POSIXct) and assert successful conversion"},{"location":"man/assertDate/#description","text":"Converts its input to type Date (or POSIXct ), and asserts that the content is in fact of suitable type by checking for remaining NA","title":"Description"},{"location":"man/assertDate/#usage","text":"assertDate(x) assertTime(x)","title":"Usage"},{"location":"man/assertDate/#arguments","text":"x An input object suitable for anydate or anytime","title":"Arguments"},{"location":"man/assertDate/#details","text":"Note that these functions just check for NA and cannot check for semantic correctness.","title":"Details"},{"location":"man/assertDate/#value","text":"A vector of Date or POSIXct objects. As a side effect, an error will be thrown in any of the input was not convertible.","title":"Value"},{"location":"man/assertDate/#authors","text":"Dirk Eddelbuettel","title":"Author(s)"},{"location":"man/assertDate/#examples","text":"assertDate(c(\"2001/02/03\", \"2001-02-03\", \"20010203\")) assertTime(c(\"2001/02/03 04:05:06\", \"2001-02-03 04:05:06\", \"20010203 040506\"))","title":"Examples"},{"location":"man/getFormats/","text":"Functions to retrieve, set or remove formats used for parsing dates. Description The time and date parsing and conversion relies on trying a (given and fixed) number of timeformats. The format used is the one employed by the underlying implementation of the Boost date_time library. Usage getFormats() addFormats(fmt) removeFormats(fmt) Arguments fmt A vector of character values in the form understood by Boost date_time Value Nothing in the case of addFormats ; a character vector of formats in the case of getFormats Author(s) Dirk Eddelbuettel See Also anytime-package and references therein Examples getFormats() addFormats(c(\"%d %b %y\", # two-digit date [not recommended], textual month \"%a %b %d %Y\")) # weekday weeknumber four-digit year removeFormats(\"%d %b %y\") # remove first","title":"getFormats"},{"location":"man/getFormats/#functions-to-retrieve-set-or-remove-formats-used-for-parsing-dates","text":"","title":"Functions to retrieve, set or remove formats used for parsing dates."},{"location":"man/getFormats/#description","text":"The time and date parsing and conversion relies on trying a (given and fixed) number of timeformats. The format used is the one employed by the underlying implementation of the Boost date_time library.","title":"Description"},{"location":"man/getFormats/#usage","text":"getFormats() addFormats(fmt) removeFormats(fmt)","title":"Usage"},{"location":"man/getFormats/#arguments","text":"fmt A vector of character values in the form understood by Boost date_time","title":"Arguments"},{"location":"man/getFormats/#value","text":"Nothing in the case of addFormats ; a character vector of formats in the case of getFormats","title":"Value"},{"location":"man/getFormats/#authors","text":"Dirk Eddelbuettel","title":"Author(s)"},{"location":"man/getFormats/#see-also","text":"anytime-package and references therein","title":"See Also"},{"location":"man/getFormats/#examples","text":"getFormats() addFormats(c(\"%d %b %y\", # two-digit date [not recommended], textual month \"%a %b %d %Y\")) # weekday weeknumber four-digit year removeFormats(\"%d %b %y\") # remove first","title":"Examples"},{"location":"man/iso8601/","text":"Format a Datetime object: ISO 8601, RFC 2822 or RFC 3339 Description ISO 8601, RFC 2822 and RFC 3339 are a standards for date and time representation covering the formatting of date and time (with or without possible fractional seconds) and timezone information. Usage iso8601(pt) rfc2822(pt) rfc3339(pt) yyyymmdd(pt) Arguments pt A POSIXt Datetime or a Date object Value A character object formatted according to ISO 8601, RFC 2822 or RFC 3339 ISO 8601 ISO 8601 is described in some detail in https://en.wikipedia.org/wiki/ISO_8601 and covers multiple date and time formats. Here, we interpret it more narrowly focussing on a single format each for datetimes and dates. We return datetime object formatted as \u20182016-09-01T10:11:12\u2019 and date object as \u20182016-09-01\u2019. If the option anytimeOldISO8601format is set to TRUE , then the previous format (with a space instead of \u2018T\u2019 to separate date and time) is used. RFC 2822 RFC 2822 is described in some detail in https://www.ietf.org/rfc/rfc2822.txt and https://en.wikipedia.org/wiki/Email#Internet_Message_Format . The Date and Time formating cover only a subset of the specification in that RFC. Here, we use it to provide a single format each for datetimes and dates. We return datetime object formatted as \u2018Thu, 01 Sep 2016 10:11:12.123456 -0500\u2019 and date object as \u2018Thu, 01 Sep 2016\u2019. RFC 3339 RFC 3339 is described in some detail in https://www.rfc-editor.org/rfc/rfc3339 It refines both earlier standards. Here, we use it to format datetimes and dates as single and compact strings. We return datetime object formatted as \u20182016-09-01T10:11:12.123456-0500\u2019 and date object as \u20182016-09-01\u2019. YYYYMMDD This is a truly terrible format which needs to die, but refuses to do so. If you are unfortunate enough to be forced to interoperate with code expecting it, you can use this function. But it would be better to take a moment to rewrite such code. Author(s) Dirk Eddelbuettel References https://en.wikipedia.org/wiki/ISO_8601 , https://www.ietf.org/rfc/rfc2822.txt , https://en.wikipedia.org/wiki/Email#Internet_Message_Format , https://www.rfc-editor.org/rfc/rfc3339 Examples iso8601(anytime(\"2016-09-01 10:11:12.123456\")) iso8601(anydate(\"2016-Sep-01\")) rfc2822(anytime(\"2016-09-01 10:11:12.123456\")) rfc2822(anydate(\"2016-Sep-01\")) rfc3339(anytime(\"2016-09-01 10:11:12.123456\")) rfc3339(anydate(\"2016-Sep-01\")) yyyymmdd(anytime(\"2016-09-01 10:11:12.123456\")) yyyymmdd(anydate(\"2016-Sep-01\"))","title":"Iso8601"},{"location":"man/iso8601/#format-a-datetime-object-iso-8601-rfc-2822-or-rfc-3339","text":"","title":"Format a Datetime object: ISO 8601, RFC 2822 or RFC 3339"},{"location":"man/iso8601/#description","text":"ISO 8601, RFC 2822 and RFC 3339 are a standards for date and time representation covering the formatting of date and time (with or without possible fractional seconds) and timezone information.","title":"Description"},{"location":"man/iso8601/#usage","text":"iso8601(pt) rfc2822(pt) rfc3339(pt) yyyymmdd(pt)","title":"Usage"},{"location":"man/iso8601/#arguments","text":"pt A POSIXt Datetime or a Date object","title":"Arguments"},{"location":"man/iso8601/#value","text":"A character object formatted according to ISO 8601, RFC 2822 or RFC 3339","title":"Value"},{"location":"man/iso8601/#iso-8601","text":"ISO 8601 is described in some detail in https://en.wikipedia.org/wiki/ISO_8601 and covers multiple date and time formats. Here, we interpret it more narrowly focussing on a single format each for datetimes and dates. We return datetime object formatted as \u20182016-09-01T10:11:12\u2019 and date object as \u20182016-09-01\u2019. If the option anytimeOldISO8601format is set to TRUE , then the previous format (with a space instead of \u2018T\u2019 to separate date and time) is used.","title":"ISO 8601"},{"location":"man/iso8601/#rfc-2822","text":"RFC 2822 is described in some detail in https://www.ietf.org/rfc/rfc2822.txt and https://en.wikipedia.org/wiki/Email#Internet_Message_Format . The Date and Time formating cover only a subset of the specification in that RFC. Here, we use it to provide a single format each for datetimes and dates. We return datetime object formatted as \u2018Thu, 01 Sep 2016 10:11:12.123456 -0500\u2019 and date object as \u2018Thu, 01 Sep 2016\u2019.","title":"RFC 2822"},{"location":"man/iso8601/#rfc-3339","text":"RFC 3339 is described in some detail in https://www.rfc-editor.org/rfc/rfc3339 It refines both earlier standards. Here, we use it to format datetimes and dates as single and compact strings. We return datetime object formatted as \u20182016-09-01T10:11:12.123456-0500\u2019 and date object as \u20182016-09-01\u2019.","title":"RFC 3339"},{"location":"man/iso8601/#yyyymmdd","text":"This is a truly terrible format which needs to die, but refuses to do so. If you are unfortunate enough to be forced to interoperate with code expecting it, you can use this function. But it would be better to take a moment to rewrite such code.","title":"YYYYMMDD"},{"location":"man/iso8601/#authors","text":"Dirk Eddelbuettel","title":"Author(s)"},{"location":"man/iso8601/#references","text":"https://en.wikipedia.org/wiki/ISO_8601 , https://www.ietf.org/rfc/rfc2822.txt , https://en.wikipedia.org/wiki/Email#Internet_Message_Format , https://www.rfc-editor.org/rfc/rfc3339","title":"References"},{"location":"man/iso8601/#examples","text":"iso8601(anytime(\"2016-09-01 10:11:12.123456\")) iso8601(anydate(\"2016-Sep-01\")) rfc2822(anytime(\"2016-09-01 10:11:12.123456\")) rfc2822(anydate(\"2016-Sep-01\")) rfc3339(anytime(\"2016-09-01 10:11:12.123456\")) rfc3339(anydate(\"2016-Sep-01\")) yyyymmdd(anytime(\"2016-09-01 10:11:12.123456\")) yyyymmdd(anydate(\"2016-Sep-01\"))","title":"Examples"}]}