orisai/nette-clock

Orisai Clock and Symfony Clock integration for Nette

1.1.1 2024-06-21 12:42 UTC

This package is auto-updated.

Last update: 2024-10-21 13:24:28 UTC


README

Orisai
Nette Clock

Orisai Clock and Symfony Clock integration for Nette

PSR-20 compatible

📄 Check out our documentation.

💸 If you like Orisai, please make a donation. Thank you!

use Orisai\Clock\Clock;
use function Orisai\Clock\now;

class ExampleService
{

	private Clock $clock;

	public function __construct(Clock $clock)
	{
		$this->clock = $clock;
	}

	public function doSomething(): void
	{
		$currentTime = $this->clock->now();
		// Or
		$currentTime = now();
	}

}