add convert carbon
This commit is contained in:
1 parent
134562949a
commit
523bdc180b
1 file changed
+13
@@ -2,8 +2,21 @@
|
||||
|
||||
namespace Hekmatinasser\Verta;
|
||||
|
||||
use Exception;
|
||||
use Hekmatinasser\Jalali\Jalali;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class Verta extends Jalali
|
||||
{
|
||||
|
||||
/**
|
||||
* Create a Carbon instance from Verta
|
||||
*
|
||||
* @return Carbon
|
||||
* @throws Exception
|
||||
*/
|
||||
public function toCarbon(): Carbon
|
||||
{
|
||||
return new Carbon($this->datetime(), $this->timezone);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user