Show Good morning/afternoon/evening/night depending on the time

Hi Koders, today I will show you how to build a procedure which returns

  • Good morning
  • Good afternoon
  • Good evening
  • Good night

depending on the local time.

Let’s get started.
I will be very straight-forward here.

The logic we will use is this:


ref

The only component we need is a clock.

Blocks:

Blocks for drag-and-drop (no explanation)

blocks (54)

Download links:
Goodday.aia (2.4 KB)
Goodday_Screen1.ais (2.8 KB)

5 Likes

Good Guide :+1:
A suggestion: what if user has modified date-time from settings

2 Likes

If user has modified date & time. Then this is the best option
@vknow360

Yes, but I think it is really unnecessary to get online time. What if the app should work offline?

2 Likes

Then no comments…

Very good guide.:+1:

3 Likes

Function is how it called in JavaScript, but we are in Kodular, which is called the procedure.

Ok we are off-topic and someone would be angry and flag my post

It’s not about this. Function is Function ok? Since the beginning of programming, Function is Function. I just quoted. Methods are Methods Events are Events … Properties are Properties … hugs

1 Like

Can you not hijack my topic guys?

2 Likes