class FormatUtils

Class FormatUtils, this class simplifies the way to get the final format for date, time and datetime.

Properties

static private array $config Config fields.
static private string $timeZone Time zone to use.
static private string $dateFormat Date format to use.
static private string $timeFormat Time format to use.
static private string $datetimeFormat Date time format to use.

Methods

static string
getFormatDate()

Returns the format for date.

static 
loadConfig()

Load config.

static string
getFormatDateTime()

Returns the format for date time.

static string
getFormatTime()

Returns the format for time.

static string
getFormattedDate(string $date = '')

Return date formatted.

static string
getFormatted(string $style = '', string $time = '')

Return formatted string.

static string
getFormattedTime(string $date = '')

Return date formatted.

static string
getFormattedDateTime(string $date = '')

Return date formatted.

Details

at line 59
static string getFormatDate()

Returns the format for date.

Return Value

string

at line 67
static loadConfig()

Load config.

at line 85
static string getFormatDateTime()

Returns the format for date time.

Return Value

string

at line 95
static string getFormatTime()

Returns the format for time.

Return Value

string

at line 107
static string getFormattedDate(string $date = '')

Return date formatted.

Parameters

string $date

Return Value

string

at line 120
static string getFormatted(string $style = '', string $time = '')

Return formatted string.

Parameters

string $style
string $time

Return Value

string

at line 139
static string getFormattedTime(string $date = '')

Return date formatted.

Parameters

string $date

Return Value

string

at line 151
static string getFormattedDateTime(string $date = '')

Return date formatted.

Parameters

string $date

Return Value

string