Events Made Easy › Forums › Bug fixed or feature request implemented › scopedays & scopemonths Feature Request
- This topic has 11 replies, 3 voices, and was last updated 13 years, 6 months ago by Anonymous.
-
AuthorPosts
-
Tue 24 May 2011 at 14:45 #42869AnonymousInactive
Over in the http://www.e-dynamics.be/bbpress/topic.php?id=857 thread I suggested:
It would be more useful to be able to specify something like “one_year_future” and “one_year_past” instead of “this_year”, so future time windows won’t shrink from 12 to 0 months and past time windows won’t grow from 0 to 12 months throughout calendar years.
However, after more thought it is obvious that an even more useful capability to accomplish that would be:
scopedays=x
where x is a signed integer that specifies any desired number of past or future days
Which could used as in these examples:
[events_list scopedays=365]
[events_list scopedays=-30]
[locations_map eventful=true scopedays=90]etc.
Furthermore, because various months have differing numbers of days, the following additional capability also would be useful:
scopemonths=x
where x is a signed integer that specifies any desired number of past or future months
Which could used as in these examples:
[events_list scopemonths=6]
[events_list scopemonths=-3]
[locations_map eventful=true scopemonths=3]etc.
Tue 24 May 2011 at 17:31 #47800FrankyKeymasterGood suggestion! I’ll try to add that this week.
Sat 28 May 2011 at 10:12 #47801FrankyKeymasterI’ve added the following in trunk: scope=+Xd, scope=-Xd, scope=+Xm, scope=-Xm, with “X” being a number,
so you can now go X days/months in the past/future. The months scope shows the X last months or the X next months, not the current month
Of course other possibilities are now possible: scope=-Xm–+Yd or so, but not done yet (easy enough to code, but I’m lazy 🙂 )
Sun 29 May 2011 at 16:50 #47802AnonymousInactiveThanks. I will give it a try.
Sun 29 May 2011 at 20:39 #47803AnonymousInactiveIt’s great, works for me. Thanks
Sun 29 May 2011 at 20:53 #47804FrankyKeymaster@Jude: so you mean you tested the latest trunk?
Mon 30 May 2011 at 12:07 #47805AnonymousInactiveTest results:
+Xd
Where X is smaller than the number of days to the first future event, no events are listed, which is correct.
Where X is equal to or larger than the number of future events, all future event are listed, which obviously is not correct.
I don’t know whether the current day is included, because I didn’t have a current day event in the database, but if not, the current day should be included in the scope.
-Xd
Any negative X value causes all past events display and the system defaults to events on the most distant day. That obviously is not correct.
+Xm
This Works, but does not include the current month and defaults to the first future month. The current month should be included in the scope and the system should default initially to the current month.
-Xm
This works, but does not include events in the current month and defaults initially to the most distant past month. It should default initially to the current month, but allow stepping back X number of past months.
Documentation Suggestion:
I used the variable ‘X’ in my feature request. However, ‘X’ is most often an unknown value in mathematics. It would be better to change ‘X’ to ‘N’ in the user documentation.
Mon 30 May 2011 at 19:53 #47806FrankyKeymasterthe days should be ok now, forgot something.
The months: I’m not including the current month because it can get confusing. Suppose you want to show the events of the last 3 months: showing the current month might show future events, and that for the last 3 months? The same logic applies for future months to be shown.
If you want the current month, I would suggest to use either “this_month” or wait until I implemented extra scopes, so you can use eg. “0m–3m”
For the events shown: use ASC and DESC as usual for the sorting.
Mon 30 May 2011 at 20:14 #47807FrankyKeymasterIn trunk now:
Feature: scope=Nm–Mm, to get the events from month N in the past/future till month M in the past future (eg. scope=-3m–2m , scope=0m–3m)
Mon 30 May 2011 at 22:12 #47808AnonymousInactiveOk, I will try the latest.
Tue 31 May 2011 at 00:15 #47809AnonymousInactiveI tried
scope=+7d showperiod=daily
and it works perfectly. What I get is today and six more days ahead.
Edit: actually I get bit more than that, but it’s close enough for rock’n’roll.
Tue 31 May 2011 at 02:21 #47810AnonymousInactiveAll the new scope options function as described using the latest trunk version (through Changeset 390951).
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.