Skip to content

Rename duration to diff for Instant #100

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

Merged
merged 2 commits into from
Jul 13, 2022
Merged

Rename duration to diff for Instant #100

merged 2 commits into from
Jul 13, 2022

Conversation

garyb
Copy link
Member

@garyb garyb commented Jul 10, 2022

I was about to make the release for #98 when I thought I'd add some test for completion's sake... and then noticed we already have this function for Date, Time, and DateTime - only it's called diff for the other types. I updated this to reflect that, and fixed the example comment a little.

It's perhaps debatable whether we should add duration for the rest and deprecate diff instead though, since it's maybe not the best name for it - and without the record to make the start/end explicit it may not be clear which way around things should be. Although I guess the consequences of getting it wrong are "just" an inverted sign, not an incorrect magnitude at least.

/cc @i-am-the-slime

Also will need to add a changelog entry before I merge it this time!

@garyb garyb requested a review from JordanMartinez July 10, 2022 22:13
@garyb garyb merged commit 7f60623 into master Jul 13, 2022
@garyb garyb deleted the instant-diff branch July 13, 2022 10:56
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