first commit
This commit is contained in:
13
common/CommonHelper.php
Normal file
13
common/CommonHelper.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace app\common;
|
||||
|
||||
class CommonHelper
|
||||
{
|
||||
public static function getYear(string $title)
|
||||
{
|
||||
preg_match('/([0-9]+)/', $title, $y);
|
||||
|
||||
return $y[1] ?? date('Y');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user