MetaFox

UserBirthday
in package
implements UserBirthday

Interface UserBirthday.

Table of Contents

Interfaces

UserBirthday
Interface UserBirthday.

Constants

DATE_OF_BIRTH_DONT_SHOW  = 1
DATE_OF_BIRTH_ENUM_TODAY  = 0
DATE_OF_BIRTH_ENUM_TOMORROW  = 1
DATE_OF_BIRTH_SHOW_AGE  = 3
DATE_OF_BIRTH_SHOW_ALL  = 4
DATE_OF_BIRTH_SHOW_DAY_MONTH  = 2

Methods

getAgeFromBirthday()  : int|null
getBirthdayFormats()  : array<string|int, mixed>
getBirthdayFormatsWithoutYear()  : array<string|int, mixed>
getCurrentAgeByUser()  : int|null
getFormattedBirthday()  : string
getFormattedUpcomingAgeByUser()  : string|null
getTranslatedBirthday()  : string|null

Constants

DATE_OF_BIRTH_DONT_SHOW

public mixed DATE_OF_BIRTH_DONT_SHOW = 1

DATE_OF_BIRTH_ENUM_TODAY

public mixed DATE_OF_BIRTH_ENUM_TODAY = 0

DATE_OF_BIRTH_ENUM_TOMORROW

public mixed DATE_OF_BIRTH_ENUM_TOMORROW = 1

DATE_OF_BIRTH_SHOW_AGE

public mixed DATE_OF_BIRTH_SHOW_AGE = 3

DATE_OF_BIRTH_SHOW_ALL

public mixed DATE_OF_BIRTH_SHOW_ALL = 4

DATE_OF_BIRTH_SHOW_DAY_MONTH

public mixed DATE_OF_BIRTH_SHOW_DAY_MONTH = 2

Methods

getAgeFromBirthday()

public getAgeFromBirthday(string|null $birthday) : int|null
Parameters
$birthday : string|null
Return values
int|null

getBirthdayFormats()

public getBirthdayFormats() : array<string|int, mixed>
Return values
array<string|int, mixed>

getBirthdayFormatsWithoutYear()

public getBirthdayFormatsWithoutYear() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCurrentAgeByUser()

public getCurrentAgeByUser(User $user) : int|null
Parameters
$user : User
Return values
int|null

getFormattedBirthday()

public getFormattedBirthday(User $context, User $user) : string
Parameters
$context : User
$user : User
Return values
string

getFormattedUpcomingAgeByUser()

public getFormattedUpcomingAgeByUser(User $user) : string|null
Parameters
$user : User
Return values
string|null

getTranslatedBirthday()

public getTranslatedBirthday(User $user) : string|null
Parameters
$user : User
Tags
inheritDoc
Return values
string|null

        
On this page

Search results