Show specific text between dates

Hi,

What I am trying to achieve is displaying whether a sports team is playing at home or away and what team they are playing that week. What would be the best way to do that? Some kind of countdown to the date they play each week or between dates?

Thanks,
Amoxia

If you know the dates/match ups in advance it’s pretty easy.

Use this tool to find out what day a matchup is:

You’ll have a lot of text fields, one for each team, placed appropriately (left side of watch; right side of watch)

Each team will have a conditional statement in the Transparency field.
$#DD#=38?100:0$

Where #DD# is the current day and the number afterwards is the date of the game. In this example, the 38th day of the year is Feb 7, 2019. It checks, sees that today that team is playing, any other day, it will turn invisible.

You do that for each team, for each day.

Below that you’ll have the Home/Away, depending on how you want to depict it… display only Home or Away, or display both and have one colored (or indicator dot/box/etc over which one it is)

If you decide to show it the first way it’s similar except you’re embedding multiple days…

Make one layer named HOME, with the text HOME and set the transparency to:
$#DD#=38?100:$$#DD#=56?100:$$#DD#=77?100:$$#DD#=85?100:0$

This checks the current day to see if it’s the 38th, 56th, 77th, or 85th day (presuming they are the HOME dates) and makes HOME visible

You’d make another layer for AWAY with the away dates similarly.

Thanks cth4242 - however this will just be for the specific day they play, not the week until game day then day after go to the next team and home/away?

That is correct, the above is just for the day.

Were you wanting to display it for the week leading up to the day?

If so, you should be able to do so, possibly similar. Instead of checking for the exact date, you’d have it check for the date being between the dates checked.

1st-38th day: TEAM 1 vs TEAM 2 - HOME
39th-56th day: TEAM 1 vs TEAM 3 - AWAY
57th-77th day: TEAM 1 vs TEAM 4 - AWAY
78th-85th day: TEAM 1 vs TEAM 5 - HOME

Either way you choose to display the information, as long as you have separate layers for games (you don’t have to do each team/date separately) it will display them right.

If you have the teams/dates/locations available I can post the code if you want. Sorry if this is confusing.

That would be a great help thanks :slight_smile:
14th March - Away - Storm
22nd March - Home - Cowboys
28th March - Home - Dragons
4th April - Away - Roosters

That is just the start so I can get an understanding of the code and I will finish it off from there as there are 25 rounds!

Thanks again!

Ok, this should work…

LAYER NAME: STORM @ AWAY 3-14
Text: STORM @ AWAY 3-14
X Pos: $#DD#<74?160:-500$
Y Pos: 98

Obviously you can tweak it how you like, but this says place the text “STORM @ AWAY 3-14” in the middle of the screen horizontally (160 pixels) when the date is earlier than March 15 (74th day). Since it’s the first match, you don’t need to specify a date range on both ends. The Y position is arbitrary, btw, you’ll likely want to set them all to the same Y position, I gave them all different ones so you could see them disappear when you change the date within the editor (bottom of the editor under Time Machine)

LAYER NAME: COWBOYS @ HOME 3-22
Text: COWBOYS @ HOME 3-22
X Pos: $#DD#>73&&#DD#<82?160:-500$
Y Pos: 128

This says place the text “COWBOYS @ HOME 3-22” in the middle of the screen horizontally (160 pixels) when the date is between March 15 (74th day) and March 22 (81st day) and -500 when it’s not. Basically, we’re telling it to move the text off watchface until a certain date. You can tweak new layers/matches accordingly.

Here’s the format:
($=If)(#TAG being checked#)(comparision)(&&=and)(#TAG being checked#)(comparision)(?=then)(assign the following value to the field [text, rotation, transparency, etc])(:=otherwise)(assign the following value to the field [text, rotation, transparency, etc])($=close formula… basically you have to bookend things)

Here’s the rest:

LAYER NAME: DRAGONS @ HOME 3-28
Text: DRAGONS @ HOME 3-28
X Pos: $#DD#>81&&#DD#<88?160:-500$
Y Pos: 158

LAYER NAME: ROOSTERS @ AWAY 4-4
Text: ROOSTERS @ AWAY 4-4
X Pos: $#DD#>87&&#DD#<95?160:-500$
Y Pos: 188

Hope this helps! Feel free to ask if you have any more questions!

EDIT:
Here’s a tip that will speed things up. Create a text field with the current day of the year.

Layer: Day of the Year (DD)
Text: DD tag - #DD#
X Pos: 150
Y Pos: 57

Then manually change the date in the Time Machine area to the date to verify the text you want to show and disappear does so on said dates. That way you don’t have to switch tabs back and forth to that link I posted earlier. The number displayed is what you’ll use in your formulas.

1 Like

Thank you so much, that works great!!! I only tried out 2 just to make sure I understood it. That is easier to work with than using transparency.
Thanks again :slight_smile:

No problem…

You’ll want to be careful of putting all that text on one line though. Make sure you’re font size can accomodate any long combinations so the text doesn’t go off the watchface.

Glad I could help!