Schrankian / campus-dual-app

An android app for the website Campus dual
MIT License
2 stars 1 forks source link

Time-based EvaluationRule support #19

Open Logianer opened 1 week ago

Logianer commented 1 week ago

It would be helpful to create an Evaluation Rule that matches based on the Lesson start and end time.

Example:

Rule:
Time: "12.00"
Color: #ff0000

would color every lesson that contains the minute "12.00": 9.00 - 10.00 - no match 10.15 - 11.15 - no match 11.30 - 12.30 - match! etc.

If a lesson ends or starts with the given time, it will also match.

Schrankian commented 1 week ago

Sure that looks like a good idea. What would the use case be? And is one timestamp enough or would it be better to define a timespan, like 12:00-14:00 to which the Rule applies?

Logianer commented 1 week ago

a timespan is also a valid approach, my first idea was to implement compare-functions like "earlier than x", "after x",... but timespans are (1) easy to understand by an end-user and (2) don't overcomplicate the code too much.