BaseActiveRecord::NHSDate PHP Method

NHSDate() public method

Returns a date field in NHS format.
public NHSDate ( string $attribute, string $empty_string = '-' ) : string
$attribute string
$empty_string string - what to return if not able to convert
return string
    public function NHSDate($attribute, $empty_string = '-')
    {
        if ($value = $this->getAttribute($attribute)) {
            return Helper::convertMySQL2NHS($value, $empty_string);
        }
    }