Comments (5)
Version 13.1.0 has been published and is available for download. Thanks everyone.
See https://github.com/lk-geimfari/mimesis/releases/tag/v13.1.0 for more details.
I'm closing this issue.
from mimesis.
We have a separate provider for the date/time related data: Datetime.
from mimesis.
I realize that, but unless I'm overlooking something, nothing that quite does the same thing. I mentioned that there are ways around this using the Datetime or other random numbers.
But I argue if Person.age()
has a place even though you can generate random numbers in other ways, Person.date_of_birth()
has as much use as that, if not more.
from mimesis.
This is a function I came up with.
def date_of_birth(minimum_age: int = 21, maximum_age: int = 115):
current_year = datetime.now().year
return gen.datetime.date(
start=current_year - maximum_age, end=current_year - minimum_age
)
Which could easily be converted to a method of Datetime
.
def date_of_birth(self, minimum_age: int = 21, maximum_age: int = 115):
return self.date(start=self._CURRENT_YEAR - maximum_age, end=self._CURRENT_YEAR - minimum_age)
When I get a little time I plan to submit a PR.
from mimesis.
I realize that, but unless I'm overlooking something, nothing that quite does the same thing. I mentioned that there are ways around this using the Datetime or other random numbers.
But I argue if
Person.age()
has a place even though you can generate random numbers in other ways,Person.date_of_birth()
has as much use as that, if not more.
I agree. I'll add this method.
from mimesis.
Related Issues (20)
- Add support for additional locales
- Use better color scheme for docs
- Add please connected data support HOT 5
- Add croatian locale HOT 5
- generic.pyi has incorrect attribute for providers.Cryptographic HOT 1
- Support for secondary addresses
- [Integration] Pytest plugin is outdated HOT 4
- Suppor Fieldset fixture for pytest plugin.
- Codecov reporting wrong coverage information. HOT 8
- factory_boy integration out of the box. HOT 1
- Support python < 3.10 HOT 1
- Remove inappropriate words from your random text selections HOT 3
- A custom handler with an alias returns an error when using the alias HOT 4
- Tests that write to files fail in windows
- Duplicate/overwritten test
- 15.1.0: pytest fails onscanning units HOT 5
- Use Markdown for Readme
- Mimesis fails on FreeBSD HOT 1
- Location aware test data HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mimesis.