danog\MadelineProto\EventHandler\Message\Entities\FormattedDate: Message entity representing a date and time, displayed by clients in the local time zone and format of the user.
Author: Daniil Gentili daniil@daniil.it
Message entity representing a date and time, displayed by clients in the local time zone and format of the user.
Properties
$offset:intOffset of message entity within message (in UTF-16 code units)$length:intLength of message entity within message (in UTF-16 code units)$date:intUnix timestamp of the date$relative:boolWhether to show the date relative to the current time (e.g. “in 5 minutes”), ignoring the other flags$shortTime:boolWhether to show the time in short format (e.g. 22:45)$longTime:boolWhether to show the time in long format (e.g. 22:45:00)$shortDate:boolWhether to show the date in short format (e.g. 17.03.22)$longDate:boolWhether to show the date in long format (e.g. March 17, 2022)$dayOfWeek:boolWhether to show the day of the week
Method list:
__construct(int $offset, int $length, int $date, bool $relative = false, bool $shortTime = false, bool $longTime = false, bool $shortDate = false, bool $longDate = false, bool $dayOfWeek = false)fromBotAPIFormat(int $offset, int $length, int $date, string $format): \danog\MadelineProto\EventHandler\Message\Entities\FormattedDategetBotAPIFormat(): stringtoBotAPI(): arraytoMTProto(): arrayfromRawEntities(list<array> $entities): list<self>fromRawEntity(\danog\MadelineProto\EventHandler\Message\Entities\MessageEntity|array $entity): \danog\MadelineProto\EventHandler\Message\Entities\MessageEntity
Methods:
__construct(int $offset, int $length, int $date, bool $relative = false, bool $shortTime = false, bool $longTime = false, bool $shortDate = false, bool $longDate = false, bool $dayOfWeek = false)
Parameters:
$offset:int$length:int$date:int$relative:bool$shortTime:bool$longTime:bool$shortDate:bool$longDate:bool$dayOfWeek:bool
fromBotAPIFormat(int $offset, int $length, int $date, string $format): \danog\MadelineProto\EventHandler\Message\Entities\FormattedDate
Create an entity from a bot API date_time_format string (as accepted by the bot API: r, or a combination of w, d/D and t/T).
Parameters:
$offset:int$length:int$date:int$format:string
getBotAPIFormat(): string
Get the bot API date_time_format string.
toBotAPI(): array
toMTProto(): array
fromRawEntities(list<array> $entities): list<self>
Parameters:
$entities:list<array>
fromRawEntity(\danog\MadelineProto\EventHandler\Message\Entities\MessageEntity|array $entity): \danog\MadelineProto\EventHandler\Message\Entities\MessageEntity
Parameters:
$entity:\danog\MadelineProto\EventHandler\Message\Entities\MessageEntity|array
Generated by danog/phpdoc