-
-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Today
conditional date broken
#4278
Comments
Looks like I tidied up the date logic a bit too much. Sorry. Please can you give branch [devel/padding] a try. Thanks I've changed the rules so that:
Now I need to create some tests and clarify the docs. NeoMutt running in three timezones: Los Angeles, London, Tokyo. |
No worries. Yep, that branch fixes the issue, thanks for the extremely quick turnaround. If I may make a suggestion, maybe you could leave the semantics of the If you think that would be too much, the current solution fixes the bug and works for me anyway. |
Great! Thanks for the suggestions, I'll have a think (about how much more that'll be :-) |
Thinking about it for like another 30 seconds, you already have the |
Expected Behaviour
The Conditional Date
%[d
for Today returns True if an email arrived today, e.g. the following expression:prints
Today HH:MM
if the email date matches the current day, orYYYY-mm-DD HH:MM
otherwise.Let's say it is 9:00 now, an email that arrived yesterday at 11 prints
Actual Behaviour
The Conditional Date
%[d
for Today returns True if an email arrived in the last 24 hours, e.g. the following expression:prints
Today HH:MM
if the email arrived in the last 24 hours, orYYYY-MM-DD HH:MM
otherwise.Let's say it is 9:00 now, an email that arrived yesterday at 11 prints
This is wrong, and also looks absurd (today 11:00 has not happened yet if it is currently 9:00).
Steps to Reproduce
Configure a conditional date containing the Today
%[d
expression inindex_format
, such as:Observe an email received yesterday but less than 24 hours ago (e.g. yesterday at 11:00 while today it is 9:00).
How often does this happen?
When did it start to happen?
I cannot be more precise now, as this is the update path that happened on openSUSE and I have not done any bisection yet. Hopefully it is not necessary.
Something must have been changed in the implementation of conditional dates (at least of the Today
%[d
date), so that now it returns true if the email date is less than 24 hours away from the current date, while it used to (and it should) return true if the email date matched the current date (YYYY-mm-DD == YYYY-mm-DD).NeoMutt Version
I have tested on 20240425 and the error occurs there as well, but I don't have that -v output available right now. Here is the output of version 20240416 that I have installed on my system right now:
The text was updated successfully, but these errors were encountered: