1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-15 07:33:04 +01:00
invoiceninja/app/Models/DatetimeFormat.php

40 lines
1.3 KiB
PHP
Raw Normal View History

2019-09-22 11:30:03 +02:00
<?php
namespace App\Models;
/**
* Class DatetimeFormat.
2023-03-08 08:33:42 +01:00
*
* @property int $id
* @property string $format
* @property string $format_moment
* @property string $format_dart
* @method static \Illuminate\Database\Eloquent\Builder|StaticModel company()
* @method static \Illuminate\Database\Eloquent\Builder|StaticModel exclude($columns)
* @method static \Illuminate\Database\Eloquent\Builder|DatetimeFormat newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|DatetimeFormat newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|DatetimeFormat query()
* @method static \Illuminate\Database\Eloquent\Builder|DatetimeFormat whereFormat($value)
* @method static \Illuminate\Database\Eloquent\Builder|DatetimeFormat whereFormatDart($value)
* @method static \Illuminate\Database\Eloquent\Builder|DatetimeFormat whereFormatMoment($value)
* @method static \Illuminate\Database\Eloquent\Builder|DatetimeFormat whereId($value)
* @mixin \Eloquent
2019-09-22 11:30:03 +02:00
*/
class DatetimeFormat extends StaticModel
{
/**
* @var bool
*/
public $timestamps = false;
/**
* @return bool|string
*/
public function __toString()
{
$date = mktime(0, 0, 0, 12, 31, date('Y'));
return date($this->format, $date);
}
}