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

Feat/future date #246

Merged
merged 3 commits into from
Jul 6, 2023
Merged

Feat/future date #246

merged 3 commits into from
Jul 6, 2023

Conversation

hound672
Copy link
Contributor

@hound672 hound672 commented Jul 4, 2023

Resolve: #245

@brianvoe brianvoe changed the base branch from master to develop July 5, 2023 16:01
@brianvoe
Copy link
Owner

brianvoe commented Jul 5, 2023

super close! instead of test i use example so that way the doc has a usage example and examples can be used for tests as well. If you want to keep your test thats fine just be sure to add an example.

@hound672
Copy link
Contributor Author

hound672 commented Jul 5, 2023

Unfortunately, I have no idea how to write example here.
Since FutureData depends on current datetime and output string in example should equals what `FutureDate returns.
Otherwise example will fail on running tests.
Maybe do you have any suggestion?

@brianvoe
Copy link
Owner

brianvoe commented Jul 5, 2023

setting a seed should do it. every other function has an example, this should be the same. If your having issues try to setup it up as close as possible like the others and show me the code and ill help you figure out the rest of the way.

@hound672
Copy link
Contributor Author

hound672 commented Jul 5, 2023

I mean FutureDate at first calls time.Now() and then adds random time duration to it.
So every FutureDate result will higher than the previous one.
Due to that I'm not able to write constant string in output example.
I pushed another one commit with example but without output string.

@brianvoe
Copy link
Owner

brianvoe commented Jul 5, 2023

ah i see the issue. Let me think about this one and see if i can come up with an answer for you

@brianvoe brianvoe merged commit 80e8f05 into brianvoe:develop Jul 6, 2023
12 checks passed
@hound672 hound672 deleted the feat/future_date branch July 6, 2023 20:43
@brianvoe
Copy link
Owner

brianvoe commented Jul 6, 2023

v6.23.0

@hound672 hound672 mentioned this pull request Jan 14, 2024
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.

Add Future Date
2 participants