question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Outdated “current” year

See original GitHub issue

Bug report

What’s wrong

Some providers return “current” dates from a few years ago, because they are hardwired to the “current” year from those times, such as:

  • mimesis.Datetime().week_date()
  • mimesis.Datetime().date()
  • mimesis.Development().version(calver=True)
  • PolandSpecProvider().pesel()

How is that should be

Having a global now would break a lot of things, because with the same seed, we would get different results at each run.

Then maybe changing mimesis’ versioning to calver and do such updates of default year with every major version? This would allow adding methods like birthdate to the Person provider as well.

System information

Not relevant.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
eumirocommented, Jun 6, 2020

It looks good. And it will return the same value within one year, which is probably okay for your users.

0reactions
lk-geimfaricommented, Jun 6, 2020

I think it will work with seed as well because date().year will always return the same value.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm-outdated
Check for outdated packages. ... Use --all to find all outdated meta-dependencies as well. ... Package Current Wanted Latest Location Depended by.
Read more >
The “outdated sources” myth - APA Style
We recommend citing reliable, primary sources with the most current information whenever possible. What it means to be “timely” varies ...
Read more >
How can I tell whether information on a web page is current or ...
Use your judgment to decide whether or not a source is current enough for your needs. ... It will usually include a day,...
Read more >
5 Reasons You Should Remove Outdated Content (And One ...
They get excited, tell their doctor about the study, only to have them cite a study from the current year debunking that treatment....
Read more >
18 things that kids 10 years from now won't even recognize
Here are a few things that may be rare 10 years from now. ... In fact, many current generation computers don't even include...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found