Difference between revisions of "Live Inline Expressions"

From MSX - Wiki
Jump to navigation Jump to search
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Some live content properties support live inline expressions for adding formatted dates and times of the current state.
 
Some live content properties support live inline expressions for adding formatted dates and times of the current state.
  
 +
== Syntax ==
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|+ Expression syntax of live inline expressions
 
|+ Expression syntax of live inline expressions
Line 7: Line 8:
 
|-
 
|-
 
| <code>{creation:date:{LIVE_DATE_FORMAT}}</code> || <code>{creation:date:mm/dd/yy}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{creation:date:{LIVE_DATE_FORMAT}}</code> || <code>{creation:date:mm/dd/yy}</code> || data-sort-value=70|'''0.1.70''' ||  
Date of creation timestamp of the live object in live date format. The <code>{LIVE_DATE_FORMAT}</code> part must be replaced with the format. Please see [[Live Date Format]] for possible values.
+
Date of creation timestamp of the live object in live date format. The <code>{LIVE_DATE_FORMAT}</code> part must be replaced with the format. Please see [[#Live Date Format]] for possible values.
 
|-
 
|-
 
| <code>{creation:time:{LIVE_TIME_FORMAT}}</code> || <code>{creation:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{creation:time:{LIVE_TIME_FORMAT}}</code> || <code>{creation:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
Time of creation timestamp of the live object in live time format. The <code>{LIVE_TIME_FORMAT}</code> part must be replaced with the format. Please see [[Live Time Format]] for possible values.
+
Time of creation timestamp of the live object in live time format. The <code>{LIVE_TIME_FORMAT}</code> part must be replaced with the format. Please see [[#Live Time Format]] for possible values.
 +
|-
 +
| <code>{creation:formatter:{LIVE_FORMATTER_ID}}</code> || <code>{creation:formatter:date_time}</code> || data-sort-value=160|'''0.1.160''' ||
 +
Date and/or time of creation timestamp of the live object in live formatter format. The <code>{LIVE_FORMATTER_ID}</code> part must be replaced with the formatter ID. Please see [[#Live Formatter ID]] for possible values.
 
|-
 
|-
 
| <code>{from:date:{LIVE_DATE_FORMAT}}</code> || <code>{from:date:mm/dd/yy}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{from:date:{LIVE_DATE_FORMAT}}</code> || <code>{from:date:mm/dd/yy}</code> || data-sort-value=70|'''0.1.70''' ||  
Date of start timestamp of the live object in live date format. The <code>{LIVE_DATE_FORMAT}</code> part must be replaced with the format. Please see [[Live Date Format]] for possible values.
+
Date of start timestamp of the live object in live date format. The <code>{LIVE_DATE_FORMAT}</code> part must be replaced with the format. Please see [[#Live Date Format]] for possible values.
  
 
'''Note: This expression only returns a value if the <code>type</code> property of the live object has been set to <code>"schedule"</code> or <code>"lifetime"</code>.'''
 
'''Note: This expression only returns a value if the <code>type</code> property of the live object has been set to <code>"schedule"</code> or <code>"lifetime"</code>.'''
 
|-
 
|-
 
| <code>{from:time:{LIVE_TIME_FORMAT}}</code> || <code>{from:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{from:time:{LIVE_TIME_FORMAT}}</code> || <code>{from:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
Time of start timestamp of the live object in live time format. The <code>{LIVE_TIME_FORMAT}</code> part must be replaced with the format. Please see [[Live Time Format]] for possible values.
+
Time of start timestamp of the live object in live time format. The <code>{LIVE_TIME_FORMAT}</code> part must be replaced with the format. Please see [[#Live Time Format]] for possible values.
 +
 
 +
'''Note: This expression only returns a value if the <code>type</code> property of the live object has been set to <code>"schedule"</code> or <code>"lifetime"</code>.'''
 +
|-
 +
| <code>{from:formatter:{LIVE_FORMATTER_ID}}</code> || <code>{from:formatter:date_time}</code> || data-sort-value=160|'''0.1.160''' ||
 +
Date and/or time of start timestamp of the live object in live formatter format. The <code>{LIVE_FORMATTER_ID}</code> part must be replaced with the formatter ID. Please see [[#Live Formatter ID]] for possible values.
  
 
'''Note: This expression only returns a value if the <code>type</code> property of the live object has been set to <code>"schedule"</code> or <code>"lifetime"</code>.'''
 
'''Note: This expression only returns a value if the <code>type</code> property of the live object has been set to <code>"schedule"</code> or <code>"lifetime"</code>.'''
 
|-
 
|-
 
| <code>{to:date:{LIVE_DATE_FORMAT}}</code> || <code>{to:date:mm/dd/yy}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{to:date:{LIVE_DATE_FORMAT}}</code> || <code>{to:date:mm/dd/yy}</code> || data-sort-value=70|'''0.1.70''' ||  
Date of end timestamp of the live object in live date format. The <code>{LIVE_DATE_FORMAT}</code> part must be replaced with the format. Please see [[Live Date Format]] for possible values.
+
Date of end timestamp of the live object in live date format. The <code>{LIVE_DATE_FORMAT}</code> part must be replaced with the format. Please see [[#Live Date Format]] for possible values.
  
 
'''Note: This expression only returns a value if the <code>type</code> property of the live object has been set to <code>"schedule"</code> or <code>"lifetime"</code>.'''
 
'''Note: This expression only returns a value if the <code>type</code> property of the live object has been set to <code>"schedule"</code> or <code>"lifetime"</code>.'''
 
|-
 
|-
 
| <code>{to:time:{LIVE_TIME_FORMAT}}</code> || <code>{to:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{to:time:{LIVE_TIME_FORMAT}}</code> || <code>{to:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
Time of end timestamp of the live object in live time format. The <code>{LIVE_TIME_FORMAT}</code> part must be replaced with the format. Please see [[Live Time Format]] for possible values.
+
Time of end timestamp of the live object in live time format. The <code>{LIVE_TIME_FORMAT}</code> part must be replaced with the format. Please see [[#Live Time Format]] for possible values.
 +
 
 +
'''Note: This expression only returns a value if the <code>type</code> property of the live object has been set to <code>"schedule"</code> or <code>"lifetime"</code>.'''
 +
|-
 +
| <code>{to:formatter:{LIVE_FORMATTER_ID}}</code> || <code>{to:formatter:date_time}</code> || data-sort-value=160|'''0.1.160''' ||
 +
Date and/or time of end timestamp of the live object in live formatter format. The <code>{LIVE_FORMATTER_ID}</code> part must be replaced with the formatter ID. Please see [[#Live Formatter ID]] for possible values.
  
 
'''Note: This expression only returns a value if the <code>type</code> property of the live object has been set to <code>"schedule"</code> or <code>"lifetime"</code>.'''
 
'''Note: This expression only returns a value if the <code>type</code> property of the live object has been set to <code>"schedule"</code> or <code>"lifetime"</code>.'''
 
|-
 
|-
 
| <code>{now:date:{LIVE_DATE_FORMAT}}</code> || <code>{now:date:mm/dd/yy}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{now:date:{LIVE_DATE_FORMAT}}</code> || <code>{now:date:mm/dd/yy}</code> || data-sort-value=70|'''0.1.70''' ||  
Date of current timestamp in live date format. The <code>{LIVE_DATE_FORMAT}</code> part must be replaced with the format. Please see [[Live Date Format]] for possible values.
+
Date of current timestamp in live date format. The <code>{LIVE_DATE_FORMAT}</code> part must be replaced with the format. Please see [[#Live Date Format]] for possible values.
 
|-
 
|-
 
| <code>{now:time:{LIVE_TIME_FORMAT}}</code> || <code>{now:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{now:time:{LIVE_TIME_FORMAT}}</code> || <code>{now:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
Time of current timestamp in live time format. The <code>{LIVE_TIME_FORMAT}</code> part must be replaced with the format. Please see [[Live Time Format]] for possible values.
+
Time of current timestamp in live time format. The <code>{LIVE_TIME_FORMAT}</code> part must be replaced with the format. Please see [[#Live Time Format]] for possible values.
 +
|-
 +
| <code>{now:formatter:{LIVE_FORMATTER_ID}}</code> || <code>{now:formatter:date_time}</code> || data-sort-value=160|'''0.1.160''' ||
 +
Date and/or time of current timestamp in live formatter format. The <code>{LIVE_FORMATTER_ID}</code> part must be replaced with the formatter ID. Please see [[#Live Formatter ID]] for possible values.
 
|-
 
|-
 
| <code>{duration:position}</code> || <code>{duration:position}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{duration:position}</code> || <code>{duration:position}</code> || data-sort-value=70|'''0.1.70''' ||  
Line 42: Line 59:
 
|-
 
|-
 
| <code>{duration:time:{LIVE_DURATION_FORMAT}}</code> || <code>{duration:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{duration:time:{LIVE_DURATION_FORMAT}}</code> || <code>{duration:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
Duration of the live object in live duration format. The <code>{LIVE_DURATION_FORMAT}</code> part must be replaced with the format. Please see [[Live Duration Format]] for possible values.
+
Duration of the live object in live duration format. The <code>{LIVE_DURATION_FORMAT}</code> part must be replaced with the format. Please see [[#Live Duration Format]] for possible values.
 
|-
 
|-
 
| <code>{duration:text:{LIVE_DURATION_TEXT}}</code> || <code>{duration:text:hms}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{duration:text:{LIVE_DURATION_TEXT}}</code> || <code>{duration:text:hms}</code> || data-sort-value=70|'''0.1.70''' ||  
Duration of the live object as live duration text. The <code>{LIVE_DURATION_TEXT}</code> part must be replaced with the text values. Please see [[Live Duration Text]] for possible values.
+
Duration of the live object as live duration text. The <code>{LIVE_DURATION_TEXT}</code> part must be replaced with the text syntax. Please see [[#Live Duration Text]] for possible values.
 
|-
 
|-
 
| <code>{progress:position}</code> || <code>{progress:position}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{progress:position}</code> || <code>{progress:position}</code> || data-sort-value=70|'''0.1.70''' ||  
Line 54: Line 71:
 
|-
 
|-
 
| <code>{progress:time:{LIVE_DURATION_FORMAT}}</code> || <code>{progress:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{progress:time:{LIVE_DURATION_FORMAT}}</code> || <code>{progress:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
Progress of the live object in live duration format. The <code>{LIVE_DURATION_FORMAT}</code> part must be replaced with the format. Please see [[Live Duration Format]] for possible values.
+
Progress of the live object in live duration format. The <code>{LIVE_DURATION_FORMAT}</code> part must be replaced with the format. Please see [[#Live Duration Format]] for possible values.
 
|-
 
|-
 
| <code>{progress:text:{LIVE_DURATION_TEXT}}</code> || <code>{progress:text:hms}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{progress:text:{LIVE_DURATION_TEXT}}</code> || <code>{progress:text:hms}</code> || data-sort-value=70|'''0.1.70''' ||  
Progress of the live object as live duration text. The <code>{LIVE_DURATION_TEXT}</code> part must be replaced with the text values. Please see [[Live Duration Text]] for possible values.
+
Progress of the live object as live duration text. The <code>{LIVE_DURATION_TEXT}</code> part must be replaced with the text syntax. Please see [[#Live Duration Text]] for possible values.
 
|-
 
|-
 
| <code>{countdown:position}</code> || <code>{countdown:position}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{countdown:position}</code> || <code>{countdown:position}</code> || data-sort-value=70|'''0.1.70''' ||  
Line 67: Line 84:
 
Countdown of the live object in percentage.
 
Countdown of the live object in percentage.
  
'''Note: This expression returns for state <code>"coming"</code> a fixed value (i.e. 100%) and in state <code>"running"</code> the actual countdown value.'''
+
'''Note: This expression returns for state <code>"coming"</code> a fixed value (i.e. 100%) and in state <code>"running"</code> the actual countdown value if the type property of the live object has been set to <code>"schedule"</code> or <code>"lifetime"</code>.'''
 
|-
 
|-
 
| <code>{countdown:time:{LIVE_DURATION_FORMAT}}</code> || <code>{countdown:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{countdown:time:{LIVE_DURATION_FORMAT}}</code> || <code>{countdown:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
Countdown of the live object in live duration format. The <code>{LIVE_DURATION_FORMAT}</code> part must be replaced with the format. Please see [[Live Duration Format]] for possible values.
+
Countdown of the live object in live duration format. The <code>{LIVE_DURATION_FORMAT}</code> part must be replaced with the format. Please see [[#Live Duration Format]] for possible values.
  
 
'''Note: This expression returns for state <code>"coming"</code> and <code>"running"</code> the actual countdown value.'''
 
'''Note: This expression returns for state <code>"coming"</code> and <code>"running"</code> the actual countdown value.'''
 
|-
 
|-
 
| <code>{countdown:text:{LIVE_DURATION_TEXT}}</code> || <code>{countdown:text:hms}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{countdown:text:{LIVE_DURATION_TEXT}}</code> || <code>{countdown:text:hms}</code> || data-sort-value=70|'''0.1.70''' ||  
Countdown of the live object as live duration text. The <code>{LIVE_DURATION_TEXT}</code> part must be replaced with the text values. Please see [[Live Duration Text]] for possible values.
+
Countdown of the live object as live duration text. The <code>{LIVE_DURATION_TEXT}</code> part must be replaced with the text syntax. Please see [[#Live Duration Text]] for possible values.
  
 
'''Note: This expression returns for state <code>"coming"</code> and <code>"running"</code> the actual countdown value.'''
 
'''Note: This expression returns for state <code>"coming"</code> and <code>"running"</code> the actual countdown value.'''
Line 83: Line 100:
 
|-
 
|-
 
| <code>{overflow:time:{LIVE_DURATION_FORMAT}}</code> || <code>{overflow:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{overflow:time:{LIVE_DURATION_FORMAT}}</code> || <code>{overflow:time:hh:mm:ss}</code> || data-sort-value=70|'''0.1.70''' ||  
Overflow of the live object in live duration format. The <code>{LIVE_DURATION_FORMAT}</code> part must be replaced with the format. Please see [[Live Duration Format]] for possible values.
+
Overflow of the live object in live duration format. The <code>{LIVE_DURATION_FORMAT}</code> part must be replaced with the format. Please see [[#Live Duration Format]] for possible values.
 
|-
 
|-
 
| <code>{overflow:text:{LIVE_DURATION_TEXT}}</code> || <code>{overflow:text:hms}</code> || data-sort-value=70|'''0.1.70''' ||  
 
| <code>{overflow:text:{LIVE_DURATION_TEXT}}</code> || <code>{overflow:text:hms}</code> || data-sort-value=70|'''0.1.70''' ||  
Overflow of the live object as live duration text. The <code>{LIVE_DURATION_TEXT}</code> part must be replaced with the text values. Please see [[Live Duration Text]] for possible values.
+
Overflow of the live object as live duration text. The <code>{LIVE_DURATION_TEXT}</code> part must be replaced with the text syntax. Please see [[#Live Duration Text]] for possible values.
 
|-
 
|-
 
| <code>{txt:{COLOR}:{LIVE_INLINE_EXPRESSION}}</code> ||  
 
| <code>{txt:{COLOR}:{LIVE_INLINE_EXPRESSION}}</code> ||  
Line 96: Line 113:
 
Colored live inline expression. The <code>{COLOR}</code> part must be replaced with a color value and the <code>{LIVE_INLINE_EXPRESSION}</code> part must be replaced with any live inline expression without the braces.
 
Colored live inline expression. The <code>{COLOR}</code> part must be replaced with a color value and the <code>{LIVE_INLINE_EXPRESSION}</code> part must be replaced with any live inline expression without the braces.
 
|}
 
|}
 +
 +
== Live Date Format ==
 +
{| class="wikitable sortable"
 +
|+ Format of live date
 +
|-
 +
! Format !! Example !! Since Version
 +
|-
 +
| <code>m{{pipe}}d{{pipe}}D{{pipe}}M</code> || <code>1{{pipe}}24{{pipe}}Thu{{pipe}}Jan</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>mm{{pipe}}dd{{pipe}}yy{{pipe}}DD{{pipe}}MM</code> || <code>01{{pipe}}24{{pipe}}19{{pipe}}Thursday{{pipe}}January</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>ddd{{pipe}}yyyy</code> || <code>24th{{pipe}}2019</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>mm/dd/yy</code> || <code>01/24/19</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>dd.mm.yy</code> || <code>24.01.19</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>yyyy-mm-dd</code> || <code>2019-01-24</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>MM d, yyyy</code> || <code>January 24, 2019</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>d. MM yyyy</code> || <code>24. January 2019</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>D mm/dd</code> || <code>Thu 01/24</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>D, dd.mm.</code> || <code>Thu, 24.01.</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>D mm/dd/yyyy</code> || <code>Thu 01/24/2019</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>D, dd.mm.yyyy</code> || <code>Thu, 24.01.2019</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>DD, MM d, yyyy</code> || <code>Thursday, January 24, 2019</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>DD, d. MM yyyy</code> || <code>Thursday, 24. January 2019</code> || data-sort-value=70|'''0.1.70'''
 +
|}
 +
 +
== Live Time Format ==
 +
{| class="wikitable sortable"
 +
|+ Format of live time
 +
|-
 +
! Format !! Example !! Since Version
 +
|-
 +
| <code>h{{pipe}}m{{pipe}}s</code> || <code>14{{pipe}}16{{pipe}}4</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>h{{pipe}}m{{pipe}}s/ampm</code> || <code>2{{pipe}}16{{pipe}}4 PM</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>hh{{pipe}}mm{{pipe}}ss</code> || <code>14{{pipe}}16{{pipe}}04</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>hh{{pipe}}mm{{pipe}}ss/ampm</code> || <code>02{{pipe}}16{{pipe}}04 PM</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>hh:mm</code> || <code>14:16</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>h:mm/ampm</code> || <code>2:16 PM</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>hh:mm:ss</code> || <code>14:16:04</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>h:mm:ss/ampm</code> || <code>2:16:04 PM</code> || data-sort-value=70|'''0.1.70'''
 +
|}
 +
 +
== Live Duration Format ==
 +
{| class="wikitable sortable"
 +
|+ Format of live duration
 +
|-
 +
! Format !! Example !! Since Version
 +
|-
 +
| <code>h{{pipe}}m{{pipe}}s</code> || <code>1{{pipe}}34{{pipe}}0</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>hh{{pipe}}mm{{pipe}}ss</code> || <code>01{{pipe}}34{{pipe}}00</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>H{{pipe}}M{{pipe}}S</code> || <code>1{{pipe}}34{{pipe}}00</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>[h]{{pipe}}[m]{{pipe}}[s]</code> || <code>1{{pipe}}34{{pipe}}</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>h:m</code> || <code>1:34</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>hh:mm</code> || <code>01:34</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>h:m:s</code> || <code>1:34:0</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>hh:mm:ss</code> || <code>01:34:00</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>m:s</code> || <code>34:0</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>mm:ss</code> || <code>34:00</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>[H:]M:ss</code> || <code>1:34:00</code> || data-sort-value=70|'''0.1.70'''
 +
|}
 +
 +
== Live Duration Text ==
 +
{| class="wikitable sortable"
 +
|+ Syntax of live duration text
 +
|-
 +
! Syntax !! Example !! Since Version
 +
|-
 +
| <code>dhms</code> || <code>1 hr 34 min</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>DHMS</code> || <code>0 days 1 hr 34 min 0 sec</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>Dhms</code> || <code>0 days 1 hr 34 min</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>hms</code> || <code>1 hr 34 min</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>hmS</code> || <code>1 hr 34 min 0 sec</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>hm</code> || <code>1 hr 34 min</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>ms</code> || <code>94 min</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>d</code> || <code>0 days</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>h</code> || <code>2 hr</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>m</code> || <code>94 min</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>s</code> || <code>5640 sec</code> || data-sort-value=70|'''0.1.70'''
 +
|-
 +
| <code>~dhms</code> || <code>2 hr</code> || data-sort-value=74|'''0.1.74'''
 +
|-
 +
| <code>~hms</code> || <code>2 hr</code> || data-sort-value=74|'''0.1.74'''
 +
|-
 +
| <code>~ms</code> || <code>94 min</code> || data-sort-value=74|'''0.1.74'''
 +
|-
 +
| <code>~s</code> || <code>5640 sec</code> || data-sort-value=74|'''0.1.74'''
 +
|}
 +
 +
== Live Formatter ID ==
 +
{| class="wikitable sortable"
 +
|+ IDs of live formatter
 +
|-
 +
! Formatter ID !! Example !! Since Version
 +
|-
 +
| <code>time</code> || <code>11:09 AM</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>time_long</code> || <code>11:09:38 AM</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>time_day</code> || <code>Wed, 11:09 AM</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>time_day_long</code> || <code>Wed, 11:09:38 AM</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>day</code> || <code>Wed 10/30</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>day_long</code> || <code>Wed 10/30/2024</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>day_full</code> || <code>Wednesday, October 30, 2024</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>day_time</code> || <code>Wed 10/30, 11:09 AM</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>day_time_long</code> || <code>Wed 10/30/2024, 11:09 AM</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>day_time_full</code> || <code>Wednesday, October 30, 2024, 11:09 AM</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>date</code> || <code>10/30/24</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>date_long</code> || <code>October 30, 2024</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>date_time</code> || <code>10/30/24, 11:09 AM</code> || data-sort-value=160|'''0.1.160'''
 +
|-
 +
| <code>date_time_long</code> || <code>October 30, 2024, 11:09 AM</code> || data-sort-value=160|'''0.1.160'''
 +
|}
 +
 +
== See also ==
 +
* [[Live Object]]
 +
* [[Live Examples]]

Latest revision as of 11:31, 1 November 2024

Some live content properties support live inline expressions for adding formatted dates and times of the current state.

Syntax[edit]

Expression syntax of live inline expressions
Expression Example Since Version Description
{creation:date:{LIVE_DATE_FORMAT}} {creation:date:mm/dd/yy} 0.1.70

Date of creation timestamp of the live object in live date format. The {LIVE_DATE_FORMAT} part must be replaced with the format. Please see #Live Date Format for possible values.

{creation:time:{LIVE_TIME_FORMAT}} {creation:time:hh:mm:ss} 0.1.70

Time of creation timestamp of the live object in live time format. The {LIVE_TIME_FORMAT} part must be replaced with the format. Please see #Live Time Format for possible values.

{creation:formatter:{LIVE_FORMATTER_ID}} {creation:formatter:date_time} 0.1.160

Date and/or time of creation timestamp of the live object in live formatter format. The {LIVE_FORMATTER_ID} part must be replaced with the formatter ID. Please see #Live Formatter ID for possible values.

{from:date:{LIVE_DATE_FORMAT}} {from:date:mm/dd/yy} 0.1.70

Date of start timestamp of the live object in live date format. The {LIVE_DATE_FORMAT} part must be replaced with the format. Please see #Live Date Format for possible values.

Note: This expression only returns a value if the type property of the live object has been set to "schedule" or "lifetime".

{from:time:{LIVE_TIME_FORMAT}} {from:time:hh:mm:ss} 0.1.70

Time of start timestamp of the live object in live time format. The {LIVE_TIME_FORMAT} part must be replaced with the format. Please see #Live Time Format for possible values.

Note: This expression only returns a value if the type property of the live object has been set to "schedule" or "lifetime".

{from:formatter:{LIVE_FORMATTER_ID}} {from:formatter:date_time} 0.1.160

Date and/or time of start timestamp of the live object in live formatter format. The {LIVE_FORMATTER_ID} part must be replaced with the formatter ID. Please see #Live Formatter ID for possible values.

Note: This expression only returns a value if the type property of the live object has been set to "schedule" or "lifetime".

{to:date:{LIVE_DATE_FORMAT}} {to:date:mm/dd/yy} 0.1.70

Date of end timestamp of the live object in live date format. The {LIVE_DATE_FORMAT} part must be replaced with the format. Please see #Live Date Format for possible values.

Note: This expression only returns a value if the type property of the live object has been set to "schedule" or "lifetime".

{to:time:{LIVE_TIME_FORMAT}} {to:time:hh:mm:ss} 0.1.70

Time of end timestamp of the live object in live time format. The {LIVE_TIME_FORMAT} part must be replaced with the format. Please see #Live Time Format for possible values.

Note: This expression only returns a value if the type property of the live object has been set to "schedule" or "lifetime".

{to:formatter:{LIVE_FORMATTER_ID}} {to:formatter:date_time} 0.1.160

Date and/or time of end timestamp of the live object in live formatter format. The {LIVE_FORMATTER_ID} part must be replaced with the formatter ID. Please see #Live Formatter ID for possible values.

Note: This expression only returns a value if the type property of the live object has been set to "schedule" or "lifetime".

{now:date:{LIVE_DATE_FORMAT}} {now:date:mm/dd/yy} 0.1.70

Date of current timestamp in live date format. The {LIVE_DATE_FORMAT} part must be replaced with the format. Please see #Live Date Format for possible values.

{now:time:{LIVE_TIME_FORMAT}} {now:time:hh:mm:ss} 0.1.70

Time of current timestamp in live time format. The {LIVE_TIME_FORMAT} part must be replaced with the format. Please see #Live Time Format for possible values.

{now:formatter:{LIVE_FORMATTER_ID}} {now:formatter:date_time} 0.1.160

Date and/or time of current timestamp in live formatter format. The {LIVE_FORMATTER_ID} part must be replaced with the formatter ID. Please see #Live Formatter ID for possible values.

{duration:position} {duration:position} 0.1.70

Duration of the live object in simple position format.

{duration:time:{LIVE_DURATION_FORMAT}} {duration:time:hh:mm:ss} 0.1.70

Duration of the live object in live duration format. The {LIVE_DURATION_FORMAT} part must be replaced with the format. Please see #Live Duration Format for possible values.

{duration:text:{LIVE_DURATION_TEXT}} {duration:text:hms} 0.1.70

Duration of the live object as live duration text. The {LIVE_DURATION_TEXT} part must be replaced with the text syntax. Please see #Live Duration Text for possible values.

{progress:position} {progress:position} 0.1.70

Progress of the live object in simple position format.

{progress:percentage} {progress:percentage} 0.1.70

Progress of the live object in percentage.

{progress:time:{LIVE_DURATION_FORMAT}} {progress:time:hh:mm:ss} 0.1.70

Progress of the live object in live duration format. The {LIVE_DURATION_FORMAT} part must be replaced with the format. Please see #Live Duration Format for possible values.

{progress:text:{LIVE_DURATION_TEXT}} {progress:text:hms} 0.1.70

Progress of the live object as live duration text. The {LIVE_DURATION_TEXT} part must be replaced with the text syntax. Please see #Live Duration Text for possible values.

{countdown:position} {countdown:position} 0.1.70

Countdown of the live object in simple position format.

Note: This expression returns for state "coming" and "running" the actual countdown value.

{countdown:percentage} {countdown:percentage} 0.1.70

Countdown of the live object in percentage.

Note: This expression returns for state "coming" a fixed value (i.e. 100%) and in state "running" the actual countdown value if the type property of the live object has been set to "schedule" or "lifetime".

{countdown:time:{LIVE_DURATION_FORMAT}} {countdown:time:hh:mm:ss} 0.1.70

Countdown of the live object in live duration format. The {LIVE_DURATION_FORMAT} part must be replaced with the format. Please see #Live Duration Format for possible values.

Note: This expression returns for state "coming" and "running" the actual countdown value.

{countdown:text:{LIVE_DURATION_TEXT}} {countdown:text:hms} 0.1.70

Countdown of the live object as live duration text. The {LIVE_DURATION_TEXT} part must be replaced with the text syntax. Please see #Live Duration Text for possible values.

Note: This expression returns for state "coming" and "running" the actual countdown value.

{overflow:position} {overflow:position} 0.1.70

Overflow of the live object in simple position format.

{overflow:time:{LIVE_DURATION_FORMAT}} {overflow:time:hh:mm:ss} 0.1.70

Overflow of the live object in live duration format. The {LIVE_DURATION_FORMAT} part must be replaced with the format. Please see #Live Duration Format for possible values.

{overflow:text:{LIVE_DURATION_TEXT}} {overflow:text:hms} 0.1.70

Overflow of the live object as live duration text. The {LIVE_DURATION_TEXT} part must be replaced with the text syntax. Please see #Live Duration Text for possible values.

{txt:{COLOR}:{LIVE_INLINE_EXPRESSION}}

{txt:msx-red:creation:date:mm/dd/yy}
{txt:msx-green:creation:time:hh:mm:ss}
{txt:msx-yellow:duration:position}
{txt:msx-blue:duration:percentage}

0.1.70

Colored live inline expression. The {COLOR} part must be replaced with a color value and the {LIVE_INLINE_EXPRESSION} part must be replaced with any live inline expression without the braces.

Live Date Format[edit]

Format of live date
Format Example Since Version
m|d|D|M 1|24|Thu|Jan 0.1.70
mm|dd|yy|DD|MM 01|24|19|Thursday|January 0.1.70
ddd|yyyy 24th|2019 0.1.70
mm/dd/yy 01/24/19 0.1.70
dd.mm.yy 24.01.19 0.1.70
yyyy-mm-dd 2019-01-24 0.1.70
MM d, yyyy January 24, 2019 0.1.70
d. MM yyyy 24. January 2019 0.1.70
D mm/dd Thu 01/24 0.1.70
D, dd.mm. Thu, 24.01. 0.1.70
D mm/dd/yyyy Thu 01/24/2019 0.1.70
D, dd.mm.yyyy Thu, 24.01.2019 0.1.70
DD, MM d, yyyy Thursday, January 24, 2019 0.1.70
DD, d. MM yyyy Thursday, 24. January 2019 0.1.70

Live Time Format[edit]

Format of live time
Format Example Since Version
h|m|s 14|16|4 0.1.70
h|m|s/ampm 2|16|4 PM 0.1.70
hh|mm|ss 14|16|04 0.1.70
hh|mm|ss/ampm 02|16|04 PM 0.1.70
hh:mm 14:16 0.1.70
h:mm/ampm 2:16 PM 0.1.70
hh:mm:ss 14:16:04 0.1.70
h:mm:ss/ampm 2:16:04 PM 0.1.70

Live Duration Format[edit]

Format of live duration
Format Example Since Version
h|m|s 1|34|0 0.1.70
hh|mm|ss 01|34|00 0.1.70
H|M|S 1|34|00 0.1.70
[h]|[m]|[s] 1|34| 0.1.70
h:m 1:34 0.1.70
hh:mm 01:34 0.1.70
h:m:s 1:34:0 0.1.70
hh:mm:ss 01:34:00 0.1.70
m:s 34:0 0.1.70
mm:ss 34:00 0.1.70
[H:]M:ss 1:34:00 0.1.70

Live Duration Text[edit]

Syntax of live duration text
Syntax Example Since Version
dhms 1 hr 34 min 0.1.70
DHMS 0 days 1 hr 34 min 0 sec 0.1.70
Dhms 0 days 1 hr 34 min 0.1.70
hms 1 hr 34 min 0.1.70
hmS 1 hr 34 min 0 sec 0.1.70
hm 1 hr 34 min 0.1.70
ms 94 min 0.1.70
d 0 days 0.1.70
h 2 hr 0.1.70
m 94 min 0.1.70
s 5640 sec 0.1.70
~dhms 2 hr 0.1.74
~hms 2 hr 0.1.74
~ms 94 min 0.1.74
~s 5640 sec 0.1.74

Live Formatter ID[edit]

IDs of live formatter
Formatter ID Example Since Version
time 11:09 AM 0.1.160
time_long 11:09:38 AM 0.1.160
time_day Wed, 11:09 AM 0.1.160
time_day_long Wed, 11:09:38 AM 0.1.160
day Wed 10/30 0.1.160
day_long Wed 10/30/2024 0.1.160
day_full Wednesday, October 30, 2024 0.1.160
day_time Wed 10/30, 11:09 AM 0.1.160
day_time_long Wed 10/30/2024, 11:09 AM 0.1.160
day_time_full Wednesday, October 30, 2024, 11:09 AM 0.1.160
date 10/30/24 0.1.160
date_long October 30, 2024 0.1.160
date_time 10/30/24, 11:09 AM 0.1.160
date_time_long October 30, 2024, 11:09 AM 0.1.160

See also[edit]