<?php

namespace App\Helpers;

use Carbon\Carbon;

class DateHelper
{

    /**
     * @param mixed $dateString
     * @param string $format
     * 
     * @return string
     */
    public static function formatCarbonDateYMD($dateString, $format = 'y-m-d'): string
    {
       if ($dateString){
           $carbonDate = Carbon::parse($dateString);

           return $carbonDate->format($format);
       }
       return "";
    }


    public static function formatCarbonDatejFY($dateString, $format = 'j F Y'): string
    {
       if ($dateString){
           $carbonDate = Carbon::parse($dateString);

           return $carbonDate->format($format);
       }
       return "";
    }
}
