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

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

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

Post by burgundy »

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
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void »

"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: 264
Joined: Fri Oct 16, 2009 9:50 am

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

Post by burgundy »

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: 4580
Joined: Thu Sep 03, 2009 6:48 pm

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

Post by therube »

(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
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void »

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: 264
Joined: Fri Oct 16, 2009 9:50 am

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

Post by burgundy »

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: 264
Joined: Fri Oct 16, 2009 9:50 am

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

Post by burgundy »

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
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void »

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

I like the syntax 2monthsago, perhaps that could be used..
burgundy
Posts: 264
Joined: Fri Oct 16, 2009 9:50 am

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

Post by burgundy »

"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
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void »

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: 264
Joined: Fri Oct 16, 2009 9:50 am

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

Post by burgundy »

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
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void »

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.
KeeWee
Posts: 3
Joined: Sun May 01, 2022 11:24 pm

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

Post by KeeWee »

Hi

V1.4.1.877 (x64) & V1.5.0.1281a (x64)

I'm actually looking for a way to search for dc:/dm:<x>weeks ago or <x>months ago where week = calendar week (Sunday ~ Saturday) & month = calendar month, like thisweek/lastweek, thismonth/lastmonth.

Was a switch <x>weeks/months/years "ago" ever added?

Today is 1/5/22 so dc:3weeksago should show files created 10/4/22~16/4/22 Etc.

Currently adding a number (integer) to this/last/past/prev switches change them from calendar week to 7 days. Etc.

in V1.4.1.877 (x64) dc:prev3weeks..last2weeks returns files created 16/4/22~1/5/22
in V1.5.0.1281a (x64) adding a integer to "prev" does not change it form defined range to days so dc:prev3weeks..last2weeks returns files created 10/4/22~17/4/22

Thanks a miilion
void
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void »

Was a switch <x>weeks/months/years "ago" ever added?
Not yet, sorry.

You will need to specify the range yourself, for example:

dm:10/4/22..16/4/22



Everything 1.5 makes this a little easier with:
dm:3weeks..2weeks

(read as 3 weeks ago til 2 weeks ago)
KeeWee
Posts: 3
Joined: Sun May 01, 2022 11:24 pm

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

Post by KeeWee »

Hi Void

First of all let me thank you for this amazing/awesome/extraordinary application, a day I’m sitting at my computer is a day I’m using “Voidtools Everything”.

(Currently I’m putting together Batch files & using the “CLI es.exe” to filter/export file lists & then create Symbolic Links for easy access/selection of targeted files by apps like Android VLC, I’m calling/running the Batch files via Android/ Termius & SSH Server (Bitvise). The Possibilities and pleasure of using “Everything “ is endless, Thanks a million)

Secondly, Thanks for the quick reply.

On Everything 1.5 dc:/dm:3weeks..2weeks returns files Created/Modified 11/4~18/4, 3 weeks ago from today so it’s using days not defined weeks (Sunday~Saturday)

Is there a setting somewhere I have to adjust?.

Thanks again
void
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void »

Thank you for your feedback.

Everything is currently not designed to search for a week, x weeks ago.

The following kind-of works:
dm:prev3weeks !dm:prev2weeks

this will use your system week (sun-sat)



I will look into ways to search for a week, x weeks ago.
KeeWee
Posts: 3
Joined: Sun May 01, 2022 11:24 pm

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

Post by KeeWee »

Hi Void

Thanks for the reply.
"dm:prev3weeks !dm:prev2weeks" works perfectly.

Thanks Again
Post Reply