2023/11/16/clock-psr20-datetime
Nobody has claimed this yet.
- Dominant language
- SCSS
- Stars
- 1
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
PHP - Using the PSR-20 Clock | Daniel Opitz - Blog
Handling time can be a tricky task, especially when it comes to testing and ensuring predictable results. PHP provides various functions like time(), microtime() and the \DateTimeImmutable class to fetch the current time, but the problem is when \DateTimeImmutable is hard-coded into logic, unit tests will not be reliable. This is where the ClockInterface comes into play.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the issue title, body, and linked article at odan.github.io/2023/11/16/clock-psr20-datetime.html. The issue does not name a file, test, or specific change, so confirm the intended content update and its completion criteria before beginning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- content
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100