Overview

Namespaces

  • Charcoal
    • Admin
      • Widget
        • Cms
    • Cms
      • Config
      • Mixin
        • Traits
      • Route
      • Section
      • Service
        • Loader
        • Manager
      • ServiceProvider
      • Support
        • Helpers
        • Interfaces
        • Traits
    • Property

Classes

  • DateHelper
  • Overview
  • Namespace
  • Class

Class DateHelper

Class DateHelper

Charcoal\Cms\Support\Helpers\DateHelper uses Charcoal\Translator\TranslatorAwareTrait (not available)
Namespace: Charcoal\Cms\Support\Helpers
Located at Charcoal/Cms/Support/Helpers/DateHelper.php
Methods summary
public
# __construct( array $data )

DateHelper constructor.

DateHelper constructor.

Parameters

$data
DateHelper data.

Throws

Exception
When constructor's data missing.
public string
# formatDate( mixed $date, string $format = 'default' )

Parameters

$date

The date [startDate, endDate] DateTimeInterface string.

$format
The format to use.

Returns

string
public string
# formatTime( mixed $date, string $format = 'default' )

Parameters

$date

The date [startDate, endDate] DateTimeInterface string.

$format
The format to use.

Returns

string
Properties summary
protected DateTime $from

$from

$from

#
protected DateTime $to

$to

$to

#
protected array $dateFormats

$dateFormats The date formats options from config.

$dateFormats The date formats options from config.

#
protected array $timeFormats

$timeFormats The time formats options from config.

$timeFormats The time formats options from config.

#
protected string $dateFormat

$dateFormat The format from dateFormats to use for the date

$dateFormat The format from dateFormats to use for the date

#
protected string $timeFormat

$dateFormat The format from dateFormats to use for the time

$dateFormat The format from dateFormats to use for the time

#
API documentation generated by ApiGen