Date function help please

I have installed KWGT and am trying to create a calendar widget for the first time.
I was looking around to create a calendar widget and came across the following function.
$df(e,r+df(d)+d)$

I tried it with $dp(r+df(d)+d)$ and it returns the last day of the last month.
I don’t understand why that function outputs the last day of the last month.

Here’s the documentation: DF - date format | Kustom HQ
Even after checking this documentation, I can’t figure out what each of R and D are doing - does anyone know or have documentation on this?

$dp(df(d))$, $dp(r+df(d))$, $dp(df(d)+d)$, etc. all output today’s date.

I don’t know how $dp(r+df(d)+d)$ behaves, as it outputs the last date of the last month.

I wrote this through a translator, so there may be some inconsistencies. Thank you for your understanding.

I think that was a good translation, better than most.

I added to the formula so it converts to a readable date and noticed it is giving you the last day of the previous month as you said.

$df(MMM dd hh:mm, dp(r+df(d)+d)))$ gives the last day of previous month.
Jun 30 2024 16:50 (correct current time).

$df(MMM dd yyyy hh:mm, df(e, dp(r+df(d)+d)))$ gives
Dec 31 1969 19:00 for some unknown reason.

The only reference I know for ‘r’ is Remove so it’s subtracting.

I think there is a bug which could contribute to the confusion. I found that

$df(E)$ gives me today’s Day of the Week (Sat)

but

$df(e)$ which should give the day of the week number (either 6 or 7 depending on when your settings start the week) just gives me the result 0 for today (Saturday).

Any experts able to clarify any of these questions?