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

Add Date::atStartOfDay function. #2546

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

mwz
Copy link
Contributor

@mwz mwz commented Jun 7, 2020

This PR adds a new Date function atStartOfDay, which turns an existing date into a new date with the time set to the start of the day, i.e. sets the time to midnight. Please see the example below:

Screenshot 2020-06-07 at 21 03 30

The existing date functions don't seem to be sorted alphabetically, so I added the new function at the end, please let me know if you'd like me to move it somewhere else; the same applies to the test (is one test sufficient?).

This is my first piece of code in OCaml, so I'd be really happy to get any feedback.

Relates to #2411.

@mwz mwz mentioned this pull request Jun 7, 2020
@mwz
Copy link
Contributor Author

mwz commented Jun 7, 2020

execute_function_works integration test seems to have failed, but the name indicates it's flaky, hopefully nothing related to this PR.

@pbiggar
Copy link
Member

pbiggar commented Jun 8, 2020

Awesome, this is great, thanks!

@pbiggar pbiggar merged commit de173e1 into darklang:master Jun 8, 2020
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.

3 participants