Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Time#shift for changing a time instance by calendar units #6598
Based on #6574, only the last two commits are specific to this PR.
The main part of this PR renames
Regarding performance, the new
referenced this pull request
Aug 24, 2018
I don't understand the difference between the 2 methods (if there is one), could you give an example showing the difference? Ty
If the wall clock advances by two hours, it shows a time two hours later, but that doesn't mean the elapsed time between both instants also equals to two hours. For example when there is a daylight savings switch in between, they might be apart on the instant time line by the duration of only one hour or even three hours.
@straight-shoota first off, let me say thank you for tackling so much of the nonsense of time and date management. This is one of the things that can create a quality legacy in a language/stdlib and it can be so helpful.
I believe you're trying to capture the essence of what it means to modify a timestamp by measured time, instead of simply incrementing the digits timestamp as if it was simple math, which I believe is what
If that is the case, the word
Either way, thanks for this.