Idiom # 184: Tomorrow
Code
time.now.env.get returns the current date and time. Add
time.duration.days 1 to get tomorrow and use
as_string time.units.day to keep the date only. Adding a
duration handles the end of a month or a year for you.
Note that time.now returns UTC. Fuzion does not support
time zones yet, so t may differ from your local date.
Runnable Example
time.now is an effect that holds a function returning the
current date and time. Instating it with ! replaces that
function, so time.now.env.get returns a fixed date instead
of the system time. The example prints 2024-02-29, since
2024 is a leap year. Without instating time.now, the
default handler returns the current system time in UTC.