1. nomeata
  2. arbtt
  3. Issues
Issue #14 resolved

improve time categorization directives

nomeata
repo owner created an issue

Felipe Sateler writes at http://bugs.debian.org/751280:

A very useful function would be that arbtt could tell me what I did today, this week and this month. Unfortunately, this is not possible, since categorize.cfg does not know about the current date. Moreover, the TimeDiff type can only deal with spans of 99 hours long.

So, for full flexibility I think the following is necessary:

  1. Add a $now variable that represents the Date arbtt-stats is being run.
  2. Add a "week of month" function to Date.
  3. extend the TimeDiff spec to allow unlimited number of digits before the ':'.

Saludos

Comments (9)

  1. nomeata reporter

    All very sensible, and I believe some have been discussed before.

    1. This is also mentioned in #10 (which might solve some of your use cases as well)
    2. What precisely do you mean by “week of month”?
    3. Easy, will do that right away.
  2. fsateler

    Clarification number 1: Yes, this appears to be the same as #10.

    Clarification for number two:

    I didn't think that part through. The requirement is to be able to identify the current week, in order to be able to ask "what did I work on this week", as opposed to "what did I work on the past 7 days". The difference is that if I ask on wednesday, then I should get only the information since monday (inclusive). I now see that simply enumerating weeks of each month will not do.

    However, if #10 is implemented then this can be implemented by $sampleage < 168:00 && day of week $date <= day of week $now, and mutatis mutandis for month.

    So I suppose that leaves only issue #10 to be resolved. This issue can be closed.

    And thanks for arbtt :)

  3. Log in to comment