Skip to main content
Inspiring
July 30, 2011

P: Problems creating Smart Collection filtered by months and capture date

  • July 30, 2011
  • 11 replies
  • 441 views

Filtering a smart collection by "Capture Date" and Months sometimes doesn't work. I have a smart collection filtering by "captured in the last 5 months but not in the last 4 months" and I get almost all of the pictures in my catalogue in the collection.

I'm using LR3.4.1

This topic has been closed for replies.

11 replies

Legend
March 24, 2017
This issue is solved in Lightroom 4 and later.
Participating Frequently
August 17, 2011
Hi Erez,

Scratch my previous comment (now deleted). I am able to confirm that the bug occurs (on Windows only) and have also confirmed that it has been previously entered in our bug database.

Thanks,
Ben
Known Participant
August 1, 2011
Yes, the bug seems to date back at least to 2.3 (http://forums.adobe.com/thread/441298 ), but curiously it seems to have had the opposite effect in 2.x, e.g. "last 3 month" showed no photos at all on the critical dates. So the bug persisted, and only the error handling for the invalid date seems to have changed in 3.x.

Ok, doesn't really matter, more important is to know that currently one should avoid the unit "months" (and "hours", see http://feedback.photoshop.com/photosh... ).
Inspiring
July 31, 2011
This is a known and accepted bug and has been there since LR2.7 (or even before, which I cannot test).

Beat
Geoff the kiwi
Community Expert
Community Expert
July 31, 2011
What an unusual bug!! Good catch........
Known Participant
July 31, 2011
Ok, this makes sense. I testet at the 31th and got 1, 3, 5, 8, etc. When I set the PCs clock to tomorrow, the problems are gone.
Inspiring
July 31, 2011
So basically this problem occurs 1-3 days a month... Funny I never noticed it before.

It'll be fixed by itself tomorrow.

Thanks!
johnrellis
Legend
July 31, 2011
On my system, the problem happens with 5, 17, 29, 41, and 53 months (the current date is 7/30/2011). But if I set my computer's clock to be 7/31/2011, then it happens with 1, 3, 5, and 8 months.

I believe the bug arises from the way LR is computing the beginning date. It takes today's date in year, month, and day format and simply subtracts the number of months, forming the beginning date, without checking that the date is valid. For example, today's date is 7/30/2011; given "in the last 5 months", it constructs the beginning date as 2/30/2011, which isn't valid. It tries to convert that invalid date to internal form, and the conversion routine returns -1 as an error value. LR doesn't check for the error value, and -1 gets interpreted as the earliest possible date.

The correct method would be to set the day portion of the beginning date to the minimum of the day and the maximum number of days in the month.

Working with dates and calendars is much harder than it seems, and programmers often get it wrong.
Inspiring
July 31, 2011
Thanks for the confirmation, I thought I was going crazy :)

I'm using weeks in the mean time, but it's not the same...
Known Participant
July 31, 2011
Seems to happen for 1, 3, 5, 8, 10, 13, 15, 17... Months. This is funny. By the way: The "is NOT in the last X months" has the same bug, but only negated, i.e. it will show no photos at all for these special values.

P.S. Bug seems to affect the rules for the modify date, too.
P.S. II. I use LR 3.4.1 WinXP SP3 32Bit.
P.S. III: Just a little detail: "Capture date is in the last X months" does not show photos that have no capture date in the metadata. The special values are no exception to this rule. So it seems to be an effect that sets the date to compare to somewhere very far into the past.