Meaning of "thisweek" and "lastweek" in search syntax

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
burgundy
Posts: 107
Joined: Fri Oct 16, 2009 9:50 am

Meaning of "thisweek" and "lastweek" in search syntax

Post by burgundy » Sun Apr 02, 2017 9:46 am

I am a bit confused about how to use these terms when searching: <last|past|prev|current|this|coming|next><year|month|week>

"WEEK" --- Is the term "week" used in the sense of always having a defined starting day? Such as Sunday or Monday.

"LAST" --- Does "lastweek" mean the last 7 days counted from today OR does it mean the most recent period of 7 days that begins with the defined starting day?

"THIS" --- Does "thisweek" also mean the last 7 days counted from today OR does it mean the week so far up to today, starting from the defined starting day?

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

Re: Meaning of "thisweek" and "lastweek" in search syntax

Post by void » Sun Apr 02, 2017 10:21 am

"WEEK" --- Is the term "week" used in the sense of always having a defined starting day? Such as Sunday or Monday.
Yes.
The starting date of the week is determined by your Windows setting "First day of week", which can be found in the Control Panel, under Region and Language, under the Formats tab.
"LAST" --- Does "lastweek" mean the last 7 days counted from today
No
OR does it mean the most recent period of 7 days that begins with the defined starting day?
Yes, exactly.

"THIS" --- Does "thisweek" also mean the last 7 days counted from today


No.
OR does it mean the week so far up to today, starting from the defined starting day?
Yes.

If you want to search for the last 7 days, use the time syntax: last7days
For example: files modified in the last 7 days:
dm:last7days

burgundy
Posts: 107
Joined: Fri Oct 16, 2009 9:50 am

Re: Meaning of "thisweek" and "lastweek" in search syntax

Post by burgundy » Tue Nov 14, 2017 4:44 pm

After some time using these modifiers, I would like to request a change.

This is the current situation:
"this month" means this current calendar month.
"last month" means the previous calendar month.
"last2months" means the previous calendar month plus the calendar month before that.

However "last2months" tends to suggest a meaning of going back 60 days from today. It is very unusual for it to mean the two calendar months before the current one but not the days in the current calendar month.

In this respect the meaning for "last2months" can't really be compared to the meaning for "lastmonth".

-----------------------------------------------------------------------------------------

(1) Of course this also applies to "weeks". "last2weeks" currently goes up to Sunday but not from Monday to today. It sounds odd!

(2) "last2years" works as expected and, unlike "weeks" or "months", includes this year

(3) "days" doesn't really have this distinction

therube
Posts: 2270
Joined: Thu Sep 03, 2009 6:48 pm

Re: Meaning of "thisweek" and "lastweek" in search syntax

Post by therube » Wed Nov 15, 2017 4:00 pm

(I'm on XP.)

No big deal, but I'll note that some searches turn up "future" dates.
(Yes, I have some.)

On my end, I'm not sure what last2months (or last2month, singular) are giving me?

Today (being 11-15-2017)...

last2month, is giving me files dated 11-06-2017, so maybe that is 1 week minus 2?
last2months, is giving me; future files (don't particularly care about that) - oh, I see, its giving me 2 months back from today.

And that's different from what burgundy describes:
"last2months" means the previous calendar month plus the calendar month before that.

(Suspect there is something OS going on here.)

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

Re: Meaning of "thisweek" and "lastweek" in search syntax

Post by void » Fri Nov 17, 2017 6:07 am

lastmonth and last<x>months have different meanings.

lastmonth = Was the file modified last month?
last<x>months = Was the file modified in the last <x> months from now?

Currently, today being 17/11/2017, last2months matches 17/9/2017 - end of times.
Today being 17/11/2017, lastmonth matches 1/10/2017 - 31/10/2017.

Would you prefer last<x>months matched the last 2 whole months, excluding the current month?
For example, today being 17/11/2017, last2months would match 1/9/2017 - 31/10/2017.

burgundy
Posts: 107
Joined: Fri Oct 16, 2009 9:50 am

Re: Meaning of "thisweek" and "lastweek" in search syntax

Post by burgundy » Fri Dec 01, 2017 9:44 pm

I have got a bit lost with what was happening here! When I get a moment i will review it all again in the light of comments from TheRube.

burgundy
Posts: 107
Joined: Fri Oct 16, 2009 9:50 am

Re: Meaning of "thisweek" and "lastweek" in search syntax

Post by burgundy » Thu Feb 07, 2019 3:20 pm

This is hugely late reply.

Perhaps instead of "last" you could use the word "previous" in date qualifiers.

This makes it clearer that the range specified started from the end of the last period. So "previous2months" means the previous calendar month and also the calendar month before that.

However it will sometimes be useful to go back exactly two months from the current date. "Last" has that meaning. So "last2 months" would mean going back approx 60 days to the same date as today but two months ago.

Is this too elaborate?

I am sure this problem must been encountered in various other applications although I am not personally aware of any.

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

Re: Meaning of "thisweek" and "lastweek" in search syntax

Post by void » Fri Feb 08, 2019 6:14 am

previous2months could work, currently previous and last do the same thing.

I like the syntax 2monthsago, perhaps that could be used..

burgundy
Posts: 107
Joined: Fri Oct 16, 2009 9:50 am

Re: Meaning of "thisweek" and "lastweek" in search syntax

Post by burgundy » Fri Feb 08, 2019 1:56 pm

"2monthsago" is a possibility and looks different enough to help distinguish it.

I sort of think "previous2months" is a better description than "last2months" for the calendar month before this one plus the calendar month before that.

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

Re: Meaning of "thisweek" and "lastweek" in search syntax

Post by void » Sat Feb 09, 2019 4:14 am

I sort of think "previous2months" is a better description than "last2months" for the calendar month before this one plus the calendar month before that.
I agree, I've made this change for the next major version of Everything.
previous2months will search for the 2 previous whole months (not including the current month)

I will leave the last prefix as is, that is, lastmonth will still search for the whole previous month (not including the current month)
and last2months will search for the last ~60 days from now.

This is how I initially setup the last prefix:
"I'm looking for a file modified last month". -This should use the previous whole month (not including the current month)
"I'm looking for a file modified in the last 2 months" -This is vague, but usually refers to ~60 days from now.

I will make this clear in Help -> Search Syntax.

I've also added the "past" prefix which always means the previous x days/weeks/months/years from now.
eg: pastweek is the same as past7days

I'm undecided on "2monthsago" syntax, as this could be used to define an exact period, not a range.

burgundy
Posts: 107
Joined: Fri Oct 16, 2009 9:50 am

Re: Meaning of "thisweek" and "lastweek" in search syntax

Post by burgundy » Sun Mar 03, 2019 10:14 pm

I will add this to this thread although it's a slightly different problem.

These don't work for me:

Code: Select all

dm:lasthour

Code: Select all

dm:lasthours

Code: Select all

dm:last1hour
However this does work:

Code: Select all

dm:last1hours
Perhaps the non-working examples I have given here should be incorporated when the other quirks in this thread are fixed.
Last edited by burgundy on Mon Mar 04, 2019 12:19 pm, edited 1 time in total.

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

Re: Meaning of "thisweek" and "lastweek" in search syntax

Post by void » Mon Mar 04, 2019 12:24 am

The current syntax for last hour is: last<x>hours
where <x> is some integer.

This will specify a time range, starting from x hours from now, until the end of time.

I've made these changes for the next major version of Everything:
  • lasthour/lasthours will find the previous hour, eg: if it is 10:30am, this will specify the range: 9:00am-9:59am
  • last1hour/last1hours, eg: if it is 10:30am, this will specify the range: 9:30am-end of time
  • last<x>hours, eg: if it is 10:30am and <x> is 2, this will specify the range: 8:30am-end of time
  • pasthour/pasthours will find the past hour from now, eg: if it is 10:30am, this will specify the range: 9:30am-end of time
  • past1hour/past1hours, eg: if it is 10:30am, this will specify the range: 9:30am-end of time
  • past<x>hours, eg: if it is 10:30am and <x> is 2, this will specify the range: 8:30am-end of time
  • previoushour/previous1hour, eg: if it is 10:30am, this will specify the range: 9:00am-9:59am
  • previous<x>hours, eg: if it is 10:30am and <x> is 2, this will specify the range: 8:00am-9:59am
  • inthelasthour/inthelasthours will find the past hour from now, eg: if it is 10:30am, this will specify the range: 9:30am-end of time
  • inthelast1hour/inthelast1hours, eg: if it is 10:30am, this will specify the range: 9:30am-end of time
Perhaps the non-working example I have given here should be incorporated when the other quirks in this thread are fixed.
Yes please.

Post Reply