[GH-ISSUE #330] Today filter triggers on any post with the same day of month #54

Closed
opened 2026-09-29 12:59:08 +00:00 by slurdge · 2 comments
Owner

Originally created by @BrandonDusseau on GitHub (Jul 13, 2026).
Original GitHub issue: https://github.com/slurdge/goeland/issues/330

I've been experiencing some weirdness with the "today" filter for a while, which I've only been able to pin down now. It seems the filter matches on any post with the same day of the month that hasn't yet been recorded, regardless of which month or year it was published.

For example, today (July 13) I received a digest with posts dated June 13. Looking at my previous emails, they arrived like this:

  • July 6 - received posts dated June 6
  • July 2 - received post dated April 2
  • June 27 - received posts dated April 27

In my case since I set my cron expression to run only once early in the morning, this caused all posts to be delayed by at least a month as well.

To Reproduce
A portion of my configuration:

loglevel = "info"
run-at-startup = false
database = "/data/goeland.db"
include-header = false

[sources]
[sources.phpbb]
url = "https://www.phpbb.com/community/feed/forum/14"
type="feed"
filters = ["today", "includelink", "includesourcetitle", "digest"]

[pipes]
[pipes.phpbb]
disabled = false
source = "phpbb"
destination = "email"
email_to = ["redacted"]
email_from = "redacted"
email_title = "{{.EntryTitle}}"
cron = "0 6 * * *"

Steps to reproduce the behavior:

  1. Configure a source with the "today" and possibly "digest" filters (see above).
  2. Trigger delivery of the digest.
  3. Observe that all unseen posts matching the day number are returned.

Expected behavior
Only posts from the current day should be delivered.

Screenshots
N/A

  • OS: Linux Mint (Docker)
  • Version v0.24.0
Originally created by @BrandonDusseau on GitHub (Jul 13, 2026). Original GitHub issue: https://github.com/slurdge/goeland/issues/330 I've been experiencing some weirdness with the "today" filter for a while, which I've only been able to pin down now. It seems the filter matches on any post with the same day of the month that hasn't yet been recorded, regardless of which month or year it was published. For example, today (July 13) I received a digest with posts dated June 13. Looking at my previous emails, they arrived like this: * July 6 - received posts dated June 6 * July 2 - received post dated April 2 * June 27 - received posts dated April 27 In my case since I set my cron expression to run only once early in the morning, this caused all posts to be delayed by at least a month as well. **To Reproduce** A portion of my configuration: ```toml loglevel = "info" run-at-startup = false database = "/data/goeland.db" include-header = false [sources] [sources.phpbb] url = "https://www.phpbb.com/community/feed/forum/14" type="feed" filters = ["today", "includelink", "includesourcetitle", "digest"] [pipes] [pipes.phpbb] disabled = false source = "phpbb" destination = "email" email_to = ["redacted"] email_from = "redacted" email_title = "{{.EntryTitle}}" cron = "0 6 * * *" ``` Steps to reproduce the behavior: 1. Configure a source with the "today" and possibly "digest" filters (see above). 2. Trigger delivery of the digest. 3. Observe that all unseen posts matching the day number are returned. **Expected behavior** Only posts from the current day should be delivered. **Screenshots** N/A - OS: Linux Mint (Docker) - Version v0.24.0
Author
Owner

@slurdge commented on GitHub (Jul 13, 2026):

Whoah !!! Nice catch !
I've glanced at the code and yep, here it is:

func filterToday(source *goeland.Source, params *filterParams) {
	var current int
	for _, entry := range source.Entries {
		if entry.Date.Day() != time.Now().Day() {
			continue
		}
		source.Entries[current] = entry
		current++
	}
	source.Entries = source.Entries[:current]
}

My bad thinking the "day" part what the actual day and not the day of the month. I'll fix it later today.

<!-- gh-comment-id:4957726700 --> @slurdge commented on GitHub (Jul 13, 2026): Whoah !!! Nice catch ! I've glanced at the code and yep, here it is: ``` func filterToday(source *goeland.Source, params *filterParams) { var current int for _, entry := range source.Entries { if entry.Date.Day() != time.Now().Day() { continue } source.Entries[current] = entry current++ } source.Entries = source.Entries[:current] } ``` My bad thinking the "day" part what the _actual_ day and not the day of the month. I'll fix it later today.
Author
Owner

@slurdge commented on GitHub (Jul 13, 2026):

@BrandonDusseau should be fixed in latest version !

<!-- gh-comment-id:4958293190 --> @slurdge commented on GitHub (Jul 13, 2026): @BrandonDusseau should be fixed in latest version !
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: slurdge/goeland#54
No description provided.