danog\MadelineProto\EventHandler\Message\Rich\Text\Date: A date, shown in the local time zone of the user, in the specified format.
Author: Daniil Gentili daniil@daniil.it
A date, shown in the local time zone of the user, in the specified format.
Properties
$text:danog\MadelineProto\EventHandler\Message\Rich\RichTextText shown by clients that don’t support dates$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(\danog\MadelineProto\EventHandler\Message\Rich\RichText|string $text, int $date, bool $relative = false, bool $shortTime = false, bool $longTime = false, bool $shortDate = false, bool $longDate = false, bool $dayOfWeek = false)from(\danog\MadelineProto\EventHandler\Message\Rich\RichText|string $text): \danog\MadelineProto\EventHandler\Message\Rich\RichTextgetText(): stringgetEntities(): list<\danog\MadelineProto\EventHandler\Message\Entities\MessageEntity>getHTML(bool $allowTelegramTags = false): string
Methods:
__construct(\danog\MadelineProto\EventHandler\Message\Rich\RichText|string $text, int $date, bool $relative = false, bool $shortTime = false, bool $longTime = false, bool $shortDate = false, bool $longDate = false, bool $dayOfWeek = false)
Parameters:
$text:\danog\MadelineProto\EventHandler\Message\Rich\RichText|string$date:int$relative:bool$shortTime:bool$longTime:bool$shortDate:bool$longDate:bool$dayOfWeek:bool
See also:
- [
\danog\MadelineProto\EventHandler\Message\Rich\RichText: Styled text of a rich message: a tree of plain texts, styles, links and so on.](../../../../../../danog/MadelineProto/EventHandler/Message/Rich/RichText.html)
from(\danog\MadelineProto\EventHandler\Message\Rich\RichText|string $text): \danog\MadelineProto\EventHandler\Message\Rich\RichText
Get a rich text from a rich text or a plain string.
Parameters:
$text:\danog\MadelineProto\EventHandler\Message\Rich\RichText|string
getText(): string
Get the plain text version of the rich text.
getEntities(): list<\danog\MadelineProto\EventHandler\Message\Entities\MessageEntity>
Get the entities for the styles of the plain text version of the rich text.
See also:
\danog\MadelineProto\EventHandler\Message\Entities\MessageEntity: Master class for message entities.
getHTML(bool $allowTelegramTags = false): string
Get an HTML version of the rich text.
Parameters:
$allowTelegramTags:boolWhether to allow telegram-specific tags like tg-spoiler, tg-emoji, mention links and so on…
Generated by danog/phpdoc