Difference between revisions of "Live Inline Expressions"

From MSX - Wiki
Jump to navigation Jump to search
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.
  
 +
== Expressions ==
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|+ Expression syntax of live inline expressions
 
|+ Expression syntax of live inline expressions
Line 97: Line 98:
 
|}
 
|}
  
== Live Date Format ==
+
== Date Format ==
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|+ Format of live date
 
|+ Format of live date
 
|-
 
|-
! Format!! Example !! Since Version
+
! 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>m{{pipe}}d{{pipe}}D{{pipe}}M</code> || <code>1{{pipe}}24{{pipe}}Thu{{pipe}}Jan</code> || data-sort-value=70|'''0.1.70'''
 
|}
 
|}
  
== Live Time Format ==
+
== Time Format ==
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|+ Format of live time
 
|+ Format of live time
 
|-
 
|-
! Format!! Example !! Since Version
+
! 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</code> || <code>14{{pipe}}16{{pipe}}4</code> || data-sort-value=70|'''0.1.70'''
 
|}
 
|}
  
== Live Duration Format ==
+
== Duration Format ==
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
|+ Format of live time
+
|+ Format of live duration
 
|-
 
|-
! Format!! Example !! Since Version
+
! 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>h{{pipe}}m{{pipe}}s</code> || <code>1{{pipe}}34{{pipe}}0</code> || data-sort-value=70|'''0.1.70'''
 
|}
 
|}
  
== Live Duration Text ==
+
== Duration Text ==
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
|+ Format of live time
+
|+ Values of live duration
 
|-
 
|-
! Format!! Example !! Since Version
+
! Values !! Example !! Since Version
 
|-
 
|-
 
| <code>dhms</code> || <code>1 hr 34 min</code> || data-sort-value=70|'''0.1.70'''
 
| <code>dhms</code> || <code>1 hr 34 min</code> || data-sort-value=70|'''0.1.70'''
 
|}
 
|}

Revision as of 14:16, 14 January 2021

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

Expressions[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.

{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".

{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".

{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.

{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 values. 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 values. 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.

{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 values. 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 values. 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.

Date Format[edit]

Format of live date
Format Example Since Version
m|d|D|M 1|24|Thu|Jan 0.1.70

Time Format[edit]

Format of live time
Format Example Since Version
h|m|s 14|16|4 0.1.70

Duration Format[edit]

Format of live duration
Format Example Since Version
h|m|s 1|34|0 0.1.70

Duration Text[edit]

Values of live duration
Values Example Since Version
dhms 1 hr 34 min 0.1.70