We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a7ba6f commit ba85333Copy full SHA for ba85333
1 file changed
src/functions.php
@@ -2,14 +2,18 @@
2
3
declare(strict_types=1);
4
5
-if (!function_exists('tick') && class_exists('Leaf\App')) {
+if (!function_exists('tick')) {
6
/**
7
* Return the leaf date instance
8
*
9
* @return Leaf\Date
10
*/
11
function tick(string $userDate = null, string $userTimeZone = null)
12
{
13
+ if (!class_exists('Leaf\App')) {
14
+ return (new Leaf\Date())->tick($userDate, $userTimeZone);
15
+ }
16
+
17
$date = Leaf\Config::get('date')['instance'] ?? null;
18
19
if (!$date) {
0 commit comments