TheFive / osmbc

Open Street Map Blog Collector
MIT License
28 stars 11 forks source link

Consider publish date to identify relevant calendar items #980

Closed call-me-matt closed 1 year ago

call-me-matt commented 1 year ago

Currently the calendar is auto created when review starts. This is a great feature. But it contains events that are still in the future on the day of review which are already outdated on the day of publishing. See for example weekly 660, which was published on March 19th and contains several events on March 18th.

Proposed solution: consider "next Sunday" as critical date if review is not opened on a Sunday.

TheFive commented 1 year ago

currently there is the date option, that should allow to define an offset for the calendar. Currently it is set to 1.

(as implemented there was no strikt publish weekday for all languages in osmbc.)

The relevant lines are here

https://github.com/TheFive/osmbc/blob/master/model/osmcalLoader.js#L78

if the start review date is a fixed weekday as the publish date is this could be an interim solution.

call-me-matt commented 1 year ago

is the creation of the calender automated? as far as I know this happens whenever someone starts review for English, which may happen at any moment in time. So my proposal is to replace this static rule by something like:

const todaysWeeksday = new Date().getDay();
if (todaysWeeksday != 0) {
  const optionDiff = 8 - todaysWeeksday;
}
TheFive commented 1 year ago

I do not like the idea to go to weekday, for now only the automatic generation of new issues and the from to date calculation is using the weekly publish assumption.

so i would like to change the date interpretation not from difference from now to difference from the start date of the issue.

TheFive commented 1 year ago

Time Filter is now as documented here:

Publish Time Frame is defined by (LANG defines option for that language)

blog will be not shown if: End Date of Event is before BlogStartDate + LANG.daysAfterBlogStart

Start Date of Event ist after BlogStartDate + LANG.daysAfterBlogStart + LANG.duration (for normal Events) Start Date of Event ist after BlogStartDate + LANG.daysAfterBlogStart + LANG.bigDuration (for normal BIG Events)

big events are currently not used. (was a wiki calendar concept), this was not implemented by OSMCAL.

Meanwhile osmcal supports a "conference" kind in the User Front end (but i did not found that in the API results).

if the kind is something to use in filter, the "Big Event" timeframe can be used again (e.g. for conferences)