-
Notifications
You must be signed in to change notification settings - Fork 0
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
Incorrect due date #3
Comments
I don't think so, Message is per-event, you can add Message to any event, birthday or reminder.
Will get to work on this, thanks for reporting Britto is not something that I use a lot, its there on my terminal config just so I don't forget about birthday's, the rest are just niceties that I thought would be great. So sorry for so many inconveniences |
Fixed! |
Sorry if I was unclear. |
Reminders seem to work correctly now. |
I'm not sure I understand what you mean........................... Please show me an example. |
That's kind of odd, they do work on my PC, let me check if there are any logic errors in the code |
I thought of something like: [template]
Birthday = "[{{.Name}}] is turning {{.AgeOrDays}} years old {{.Due}}! {{.Date}} - {{.Message}}"
Reminder = "[{{.Name}}] is due {{.Due}}! {{.Date}} - {{.Due}} - {{.Message}}" or: [template]
Birthday = "[{{.Name}}] is turning {{.AgeOrDays}} years old {{.Due}}! {{.Date}}\n{{.Message}}"
Reminder = "[{{.Name}}] is due {{.Due}}! {{.Date}} - {{.Due}}\n{{.Message}}" If that makes sense. |
After thinking on this some more, I think it might make more sense if it was like this: [template]
FormattedMessage = " - {{.Message}}"
Birthday = "[{{.Name}}] is turning {{.AgeOrDays}} years old {{.Due}}! {{.Date}}{{.FormattedMessage}}"
Reminder = "[{{.Name}}] is due {{.Due}}! {{.Date}} - {{.Due}}{{if .Message }}{{.FormattedMessage}}{{end}}" or: [template]
FormattedMessage = "\n{{.Message}}"
Birthday = "[{{.Name}}] is turning {{.AgeOrDays}} years old {{.Due}}! {{.Date}}{{.FormattedMessage}}"
Reminder = "[{{.Name}}] is due {{.Due}}! {{.Date}} - {{.Due}}{{if .Message }}{{.FormattedMessage}}{{end}}" Edit: Added |
Just compiled and works for me. |
Sorry to bother you again. Seems this issue isn't done quite yet. ~
❯ date +%d/%m/%Y
20/10/2024
~
❯ britto
[Example Event 1] is due today! 21/10/2024
[Example Event 2] is due in 3 days! 24/10/2024 |
Mind sending your entire config? EDIT: Go's time library is very confusing, date formats are 02, which is month, 01 which is day and 2006 which is the year, I think I've found the issue in the function that parses dates |
With config:
I get output:
Which should say
tomorrow
.Also, should
Message
be part of template section?PS. Sorry for spamming so many issues in such a short time.
The text was updated successfully, but these errors were encountered: