tp TouchPointWP Utilities DateTimeExtended - TenthPres/TouchPoint-WP GitHub Wiki

tp\TouchPointWP\Utilities\DateTimeExtended

A helper class for DateTimeImmutable.


  • Full name: \tp\TouchPointWP\Utilities\DateTimeExtended
  • Parent class: DateTimeImmutable

Properties

isAllDay

public bool $isAllDay

Methods

__construct

public __construct(mixed $time = "now", mixed $timezone = null): mixed

Parameters:

Parameter Type Description
$time mixed
$timezone mixed

format

Get a formatted date string according to the given format. For user-facing text, please use format_i18n instead, which allows the format string to be localized.

public format(string $format): string

Parameters:

Parameter Type Description
$format string

See Also:

  • \tp\TouchPointWP\Utilities\self::format_i18n()

format_i18n

Get a human-intended formatted string according to the given format.

public format_i18n(string $format): string

Parameters:

Parameter Type Description
$format string