]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/bugs/no_future_relative_month_for_month_calendar.mdwn
removed
[git.ikiwiki.info.git] / doc / bugs / no_future_relative_month_for_month_calendar.mdwn
1 The following could would be expected to produce a 3-month output similar to <code>gcal .</code>
3 [[!format txt """
4 [[!calendar type="month" month="-1"]]
5 [[!calendar type="month" ]]
6 [[!calendar type="month" month="+1"]]
7 """]]
9 **Behaviour:** The 3rd entry doesn't show the *next* month, but the *1st* month of the year (aka January).
11 **Problem:** Since there are no negative month numbers (unless someone starts with march because of Feb 29), *–1* is interpreted correctly.
12 Explicitely positive numbers aren't recognized as being relative. Possibly it is the numerical interpretation of the value, there is no difference between *n* and *+n*.
14 **Solution:** treat the value as string, check for a leading *+*, set a *relativeMonth* flag (which then also should happen on negative values, if it does not happen yet). If then it is set for the month in question, first calculate *month_year* and then go on as usual.
16 **Idea:** since i mentioned gcal earlier, how about some of the shorthanded sytax as "." for this, ".-" for previous, ".+" for next month together with its neighbours?
18 -- [[EdePopede]]