-
Notifications
You must be signed in to change notification settings - Fork 179
Add maketime and makedate datetime functions
#755
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
Add maketime and makedate datetime functions
#755
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #755 +/- ##
============================================
+ Coverage 94.83% 94.84% +0.01%
- Complexity 2898 2908 +10
============================================
Files 287 287
Lines 7803 7825 +22
Branches 568 571 +3
============================================
+ Hits 7400 7422 +22
Misses 349 349
Partials 54 54
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Could you rebase your branch? There seems many irrelevant changes from previous commit. Thanks! |
1b6877d to
00a2dca
Compare
Should be ok now. |
dai-chen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes!
Signed-off-by: Yury Fridlyand [email protected]
Description
maketime, references: one two00:00:00.0 - 23:59:59.(9);makedate, references one twoImplementation details
Functions have 2 implementations:
I used
easierone, butfasterone used in unit tests. Could be swapped.According to MySQL both functions accept double values. Arguments which are not supposed to have fraction parts (e.g. hour, year) are rounded.
maketimedoesn't support range of +-838 hours, it is limited by 24 hour clock time. Implementation of that requires big changes.Issues Resolved
#722
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.