Calculating current In game month, and displaying day of the week via a clock widget/funciton

Hi all.

So I’ve been trying to figure out a way to get this to work for almost 2 months now, with virtually no documentation, tutorials, or advice on the Issue… maybe I’m just missing something?

So I’ve already setup a day/night cycle In my game, and a function that calculates the days, hours, and minutes of the cycle, and displays It In a widget. What I can’t seem to figure out how to do Is, how to display the actual day of the week Instead of just day 1, day 2, etc, and to also add the current month, synced up the the day/night cycle, and of course to display the name of that month.

Here Is a screenshot of my current code:

You can use datetime structures

image

But the day, is a bit of a problem. Do you have to know the name of the first day of the year, and % 7 with that…

So I would basically just plug that Into my code, and It would display the current month (and name of month)?

Well, I’m not exactly going for realism, my game Is sort of an arcadey style. Basically I have my day/night cycle, and I have a clock function synced up with It to display the current hours, and minutes, and number of days.

As I mentioned before I would like to add the name of the day (monday-sunday), and add the months (name of the month) to display my current Ingame time.

For example say I setup my game to start on a Monday (day 0), after 1 day passes Ingame I’d like my display to say Tuesday, and hours/minutes of that day, then after another day, It’d say Wednesday, and hours/minutes of that day.

After 7 Ingame days It would just reset to Monday, and continue In a loop.

After 30 Ingame days It would automatically switch to a new month.

So again, not really going for realism just a simple day/night cycle that calculates the day, and month, and just endlessly loops, and displays In a hud widget.

The month node only gives you 1-12, so you would need to change that into a string.

Name of the day is a problem, without calls to other libraries.

I see

there’s probably more.

Yeah much like the days of the week, I’m only going for the 12 months, then just loop back to the first month again. Endless loop.