This repository was archived by the owner on Sep 10, 2025. It is now read-only.
Replies: 1 comment 2 replies
-
|
if you wanted to PR your solution, I'll merge it and release a new version with the changes in the following days! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I use ElevenClock in my organization to display the current work week (%W) using the custom formatting options (it's very useful thanks!). Unfortunately my organization uses a different definition of work week so some years there is an off by one error. It looks like ElevenClock uses the strftime C function which defines week 1 as starting on the first Monday. There is an ISO standard (ISO 8601) that defines things differently (Week 1 is the first week with a majority of its days in Jan), and my org uses a third definition.
My recommendation is to allow offsets/expressions in the custom data formatting to solve this problem more generally. e.g
%a {%W+1}.%w to add 1 week
I imagine it could be useful for other offsets I'm not thinking of.
I'm open to other solutions, but I have already implemented a fix for myself using a simple evaluation function that supports basic addition and subtraction inside {}'s as above that wraps the calls to strftime.
If there is interest I would be happy to create a pull request so others could benefit. It's a relatively small change, but I personally know a bunch of folks that would find it very useful.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions