Bot response depending on the current time

Get and convert the current time to required format

Get the current date and time with helper:

{{formatDate (now) "DD.MM.YYYY HH:mm" "ru"}}

Set a value to Time variable with Assign a variable component. Since we only want to know when user entered the bot, we need to remove the date from the helper and leave only hours and minutes:

{{formatDate (now) "HH:mm" "ru"}}

Process the time and translate to set screens

Put Fork component to the screen. Set The variable name to Time.

It’s easier to make the regular expression for the first interval — 10 to 19:

^1[0-8]\:[0-5][0-9]$

Add this regular expression to the Fork value. In Data Type select Regular expression. The default target is 19 to 10 interval.

Format the bot reply screens and we’re done.

((10|11|12):[0-9]{2}:[0-9]{2}\s(am)|([1-6]{1}):[0-9]{2}:[0-9]{2}\s(pm))

To convert the current date, we can use helper:

{{formatDate (now) "DD.MM.YYYY" "en"}}

There is another helper to convert a user-input date:

{{formatDate Date1 "DD.MM.YYYY" "en"}}

Where Date1 is a user-input date value.

The bot can be implemented like this:

Use helper to add one day to the current date:

{{addDate (formatDate now "DD.MM.YYYY h:mm:ss a" "en") 1 "days" "DD.MM.YYYY h:mm:ss a" "en"}}

You can change 1 to the desired number of days that you add:

{{addDate (formatDate now "DD.MM.YYYY h:mm:ss a" "en") 15 "days" "DD.MM.YYYY h:mm:ss a" "en"}}

Change "days" to "months" to add months:

{{addDate (formatDate now "DD.MM.YYYY h:mm:ss a" "en") 1 "months" "DD.MM.YYYY h:mm:ss a" "en"}}

To "weeks" to add weeks:

{{addDate (formatDate now "DD.MM.YYYY h:mm:ss a" "en") 1 "weeks" "DD.MM.YYYY h:mm:ss a" "en"}}

To "years" to add years:

{{addDate (formatDate now "DD.MM.YYYY h:mm:ss a" "en") 1 "years" "DD.MM.YYYY h:mm:ss a" "en"}}

To "quarters" to add quarters:

{{addDate (formatDate now "DD.MM.YYYY h:mm:ss a" "en") 1 "quarters" "DD.MM.YYYY h:mm:ss a" "en"}}

You can test these and other options in the sandbox:

Helper for output month in a form of a word

The month in a date is usually output as a number, but if you need the name of the month, you can use helper:

{formatDate (now) "MMM" "en"}}