Follow

Disclaimer: I’m shit at actual programming. If I want to see if a certain Monday is 1-4 weeks after the first Monday in a list (e.g. aMonday to dMonday in a 4-week cycle), is there a better way than dividing the number of weeks by (1/2)

4, then 3, then 2 and depending on whether a whole number is returned at any, break there and return the result? If it helps, it’s , but I’d rather find the language-agnostic way to do this:
Example, 15th Monday: 15/4 = not a whole number, 15/3 = 5 so return “3” (2/2)

Show thread
Sign in to participate in the conversation
chaos.social

chaos.social – a Fediverse instance for & by the Chaos community