Is it possible to (re)define display_name based on a timeperiod?

Case in point:

Mysql server with replication, also does backup, so replication is temporarity stopped.

mysql_slave_downtime = “timeperiod_defined_elsewhere”
mysql_check_slave = {{ get_time_period(macro("$mysql_slave_downtime$")).is_inside != true

This works as expected.
Is it possible to do the same with display_name?

Thanks,
Gerardo