takbb
March 9, 2024, 9:50am
4
Hi @Joey666
It is also possible to use a String Manipulation “java hack” to return the date for Monday of the current week:
string(
java.time.LocalDate.now().minusDays(
java.time.LocalDate.now().getDayOfWeek().getValue() - 1
)
)
This works by subtracting the current day number (minus 1) from the current date. Monday = 1, Sunday =7, so current date minus (day number - 1 ) is the date of Monday.
For a while now I’ve been using various features of String Manipulation that you won’t generally find documented. I guess therefore, that what I am writing here should be given the caveat “use at your own risk” since it is always possible that in the future, the String Manipulation (and its “(variable)” counterpart node) could be rewritten and the undocumented features would no longer work.
However, since it sits on top of java, and these features make use of its close relationship with java, i…
2 Likes