BUG: On Jan 1, "On this day" shows last night's New Year's Eve photos as "1 year ago today"
Is there an existing issue for this?
- [x] I have searched the existing issues
What happened?
The anniversary memory looks one day either side of today (_anniversary_window). Photos are then grouped by their own calendar year, and years_ago = reference.year - capture_year. That's wrong across New Year: seen from Jan 1, 2026, a photo from Dec 31, 2025 is one day old, but it passes the year <= 2025 filter and is counted as "1 year ago".
Reproduced through POST /memories/generate (reference_date: 2026-01-01) and GET /memories/{id}, with six photos each from Dec 31 2025, Jan 1 2025 and Dec 31 2024:
- "1 year ago today · January 2025" has the Jan 1, 2025 photos and the Dec 31, 2025 ones (last night)
- "2 years ago today · December 2024" shows photos from Dec 31, 2024, which is 1 year and 1 day ago
Every import or sync runs curation for today's date (routes/folders.py calls memory_curator_run() with date.today()), so this shows up for anyone who adds photos on Jan 1. New Year's Eve is one of the busiest photo nights of the year.
The culprit is _curate_anniversaries() in backend/app/utils/memory_curator.py: it filters candidates on the photo's own calendar year and sets years_ago = reference.year - capture_year, instead of crediting each photo to the anniversary nearest the reference date.
Expected: on Jan 1, 2026, Dec 31, 2025 photos are not shown, Dec 31, 2024 photos count as "1 year ago", and the existing calendar-edge test (test_handles_calendar_edges) also checks which year each photo is credited to.
I'd like to work on this.
Screenshots
Memories page — the "1 year ago today · January 2025" card shows 12 photos (should be 6):
Opening that same card — a photo captioned "31 December 2025" (slide 11/12) inside a "1 year ago" memory:
Reproduction script output (reference date 2026-01-01):
Record
- [x] I agree to follow this project's Code of Conduct
👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)
⚠️ Potential Duplicate Issue (Semantic Match)
This issue appears semantically similar to the following issues in AOSSIE-Org/PictoPy:
-
fix: date-based memories are misclassified as location memories (#1229, open) https://github.com/AOSSIE-Org/PictoPy/issues/1229 Similarity: 56.1%
-
Feat: Weekends category in memories section (#1213, open) https://github.com/AOSSIE-Org/PictoPy/issues/1213 Similarity: 56.1%
Please review before proceeding.
@rohan-pandeyy i have checked its not a duplicate issue i check please assign this so that i can fix it
Link your account with Gitcord
Thanks for opening this issue, @Saurabhyadav0!
To receive Discord notifications and contributor tracking for this organization:
- Join Discord: https://discord.gg/hjUhu33uAn
- In Discord, run
/link Saurabhyadav0 - Paste the verification code into your GitHub bio (or a public gist)
- Click Verify in Discord (or run
/verify-link Saurabhyadav0)
Once linked, Gitcord can notify you about assignments, mentions, and more.
— Posted by Gitcord
@Saurabhyadav0 Is this issue solved? If not can u inform and assign me the issue
@rohan-pandeyy please assign this when free , sorry @Darkspectre123 working on it
@rohan-pandeyy Thank you for assigning this issue to me. I will create the PR in few days ..
@rohan-pandeyy Can u look into the pr and provide the workflow approval please