CustomerDateOfBirth
extends DateTime
in package
Value Object
Class CustomerDateOfBirth
Represents a customer birth date
Tags
Table of Contents
- $isNullDate : bool
- Is null date?
- __construct() : mixed
- Constructor of the class CustomerDateOfBirth.
- format() : mixed|string
- Format DateTime
Properties
$isNullDate
Is null date?
protected
bool
$isNullDate
= alse
Methods
__construct()
Constructor of the class CustomerDateOfBirth.
public
__construct([string $p_dateOfBirth = '1000-01-01 00:00:00' ]) : mixed
Parameters
- $p_dateOfBirth : string = '1000-01-01 00:00:00'
-
Customer's date of birth.
Return values
mixed —format()
Format DateTime
public
format(string $p_format) : mixed|string
Formats a date by a given pattern and ensures that dates that represent empty data are formatted to '1000-01-01 00:00:00'
Parameters
- $p_format : string
-
Date format.
Return values
mixed|string —Formatted date.