add offers count, & minor fixes code standards
This commit is contained in:
@@ -6,8 +6,6 @@ use Illuminate\Support\Str;
|
||||
use Carbon\Carbon;
|
||||
use Jenssegers\Date\Date;
|
||||
|
||||
use App\Repositories\Languages;
|
||||
|
||||
class DateCalculation
|
||||
{
|
||||
public static function isPast($date, $format = false)
|
||||
@@ -20,12 +18,12 @@ class DateCalculation
|
||||
return Carbon::createFromFormat(self::getFormat($format), $date)->greaterThan(Carbon::now());
|
||||
}
|
||||
|
||||
public static function isAfter($date1, $date2)
|
||||
public static function isAfter($date1, $date2, $format = false)
|
||||
{
|
||||
return Carbon::createFromFormat(self::getFormat($format), $date1)->greaterThan(Carbon::createFromFormat(self::getFormat($format), $date2));
|
||||
}
|
||||
|
||||
public static function isBefore($date1, $date2)
|
||||
public static function isBefore($date1, $date2, $format = false)
|
||||
{
|
||||
return Carbon::createFromFormat(self::getFormat($format), $date1)->lessThan(Carbon::createFromFormat(self::getFormat($format), $date2));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user