Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement floor and ceiling; closes #64 #65

Merged
merged 1 commit into from
Apr 27, 2020
Merged

Conversation

lsilvest
Copy link
Collaborator

For durations we match the xts::align.time function, and for periods we pay a bit the need to check for time zone changes, but it's a very acceptable price. Furthermore, one would use periods only for granularities of one hour or more, so in practice it should never be an issue.

                 test replications elapsed relative
3 nanotime (duration)           10   5.082    1.000
2   nanotime (period)           10  11.586    2.280
1                 xts           10   5.391    1.061

Copy link
Owner

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fabulous. Thanks for all the documentation and tests!

@eddelbuettel eddelbuettel merged commit fe1d20d into master Apr 27, 2020
@eddelbuettel eddelbuettel deleted the feature/rounding branch April 30, 2020 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants