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

IDEA: random java.time.Duration #677

Open
wcarmon opened this issue Nov 23, 2021 · 1 comment
Open

IDEA: random java.time.Duration #677

wcarmon opened this issue Nov 23, 2021 · 1 comment

Comments

@wcarmon
Copy link

wcarmon commented Nov 23, 2021

Is your feature request related to a problem? Please describe.

Feature idea: random Duration

Describe the solution you'd like

Faker faker = ... ;

Duration randomDur = faker.duration().atMost(Duration.ofMinutes(60));

Support for generating java.time.Duration

Describe alternatives you've considered

Faker faker = ... ;

Duration randomDur = Duration.ofMinutes((long) faker.number().numberBetween(0, 60));

Additional context
N/A

@snuyanzin
Copy link
Contributor

@wcarmon

generation of Duration and Period are supported in https://github.com/datafaker-net/datafaker which is a port of java-faker to jdk8

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

No branches or pull requests

2 participants