messageEntityFormattedDate

Represents a specific point in time, rendered as specified here »

All flags are optional, with the following limitations:

  • relative cannot combined with any other flag
  • short_time and long_time cannot be combined with each other
  • short_date and long_date cannot be combined with each other

If any of the flags are combined, their rendering order in the text is the following:

  • day_of_week
  • short_time/long_time
  • short_date/long_date

Constructor schema is available as of layer 223. Switch »

Parameters

Name Type Description
flags # Flags, see TL conditional fields
relative flags.0?true If set, render a relative date, see here » for more info. Cannot be combined with any of the other flags.
short_time flags.1?true Renders the time in short format: hours and minutes, according to the user's locale settings; cannot be combined with long_time.
long_time flags.2?true Renders the time in long format: hours, minutes, seconds and maybe timezone, according to the user's locale settings; cannot be combined with short_time.
short_date flags.3?true Renders the time in short format: month, date, (and year, if different from the current one), all according the user's locale settings; cannot be combined with long_date.
long_date flags.4?true Renders the time in long format: always month, date and year, all according the user's locale settings; cannot be combined with short_date.
day_of_week flags.5?true Renders the day of the week according to the user's locale settings.
offset int Offset of message entity within message (in UTF-16 code units)
length int Length of message entity within message (in UTF-16 code units)
date int The date as a UNIX timestamp: the allowed value ranges from 0 to the current date plus 1098 days (time()+1098*86400).

Type

MessageEntity

Related pages

Styled text with message entities

How to create styled text with message entities