Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add information about overtime #27

Closed
wAuner opened this issue Mar 6, 2021 · 10 comments
Closed

Add information about overtime #27

wAuner opened this issue Mar 6, 2021 · 10 comments
Labels
ENHANCEMENT Ideas and feature requests

Comments

@wAuner
Copy link
Contributor

wAuner commented Mar 6, 2021

I noticed something that I'm really missing:
The sum of my overtime -not including- the current time. For example for klog now -d

            Today    Overall
Total          2m    165h27m
Should        8h!      168h!
Diff       -7h58m     -2h33m
E.T.A.      1:31>      20:06

I wish there was maybe a first line which would tell me what's the total of my overtime without taking the current time into account (or assuming I fulfill my should time today). Not sure how to best name and display it, but I think that's very important.

@wAuner
Copy link
Contributor Author

wAuner commented Mar 6, 2021

the same also applies to klog report -d

@jotaen jotaen added the ENHANCEMENT Ideas and feature requests label Mar 6, 2021
@jotaen jotaen changed the title add information about overtime Add information about overtime Mar 6, 2021
@wAuner
Copy link
Contributor Author

wAuner commented Mar 6, 2021

Maybe something along those lines

Time balance as of yesterday: +8h35m

            Today    Overall
Total          2m    165h27m
Should        8h!      168h!
Diff       -7h58m     -2h33m
E.T.A.      1:31>      20:06

@jotaen
Copy link
Owner

jotaen commented Mar 8, 2021

Just for clarification, so I can understand your use-case better: do you mean the diff without the current time or without the current day? Because in the original post you mention “without taking the current time into account”, but in the example you say “Time balance as of yesterday”.

So you are basically interested to also see the information that klog total --diff --before 2021-03-07 would give you, is that right? (Assuming that 2021-03-07 yesterday’s date.)

@wAuner
Copy link
Contributor Author

wAuner commented Mar 10, 2021

I guess it's more like the case without the current day, because I don't want to see today's "should time" included either.
Most time keeping accounts in companies show you your time balance where the current workday is not included. So that you always have an overview over how much overtime you have. This helps a lot for planning your workload/worktime and to me is absolute essential.

@wAuner
Copy link
Contributor Author

wAuner commented Mar 10, 2021

On another note: klog total --diff --before 2021-03-07 the docs say that the date specified by --before is inclusive. I find that very counterintuitive. If I say before today, then I'm almost always talking about the point up until today, not including today.

@jotaen
Copy link
Owner

jotaen commented Mar 10, 2021

I guess it's more like the case without the current day, because I don't want to see today's "should time" included either.

Okay, thanks for clarifying. I think this makes sense, I’ll think about it!

I find that very counterintuitive. If I say before today, then I'm almost always talking about the point up until today, not including today.

That’s a very fair point, I tend to agree 😆 Just out of curiosity: would you leave --after as is or change that as well? (It’s currently inclusive.) UPDATE: See #31 for further discussion.

@wAuner
Copy link
Contributor Author

wAuner commented Mar 10, 2021

I‘d vote for after and before to be both exclusive

@jotaen
Copy link
Owner

jotaen commented May 6, 2021

I finally got around to thinking about this some more. (Actually, I also found myself needing this functionality now 😄 )

The klog now command treats the current day (either “today” or “yesterday”) as special and splits it off from the overall time. The missing link between “current” and “overall” is everything that happend before the current day. This could be reflected in a separate column called e.g. “Past”, which contains all previous records up until the current day. So, in mathematical terms, Current + Past = Overall

          Current       Past     Overall
          (Today)        
Total          2m    165h25m     165h27m
Should        8h!      160h!       168h!
Diff       -7h58m     +5h25m      -2h33m
E.T.A.      1:31>                  20:06

E.T.A. obviously doesn’t make much sense for the past.

@jotaen
Copy link
Owner

jotaen commented May 6, 2021

Also, I’m thinking about flipping the axes of the output table, because I think that would clarify the information design. So something along the lines of:

            Total    Should     Diff    End Time
Current        2m       8h!   -7h58m       1:31>
Past      165h25m     160h!   +5h25m
         ========  ======== ========
          165h27m     168h!   -2h33m       20:06

That way it’s more obvious that the last line is basically the sum of the previous ones.

@wAuner
Copy link
Contributor Author

wAuner commented May 7, 2021

I like the flipped axes version, it's more intuitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENHANCEMENT Ideas and feature requests
Projects
None yet
Development

No branches or pull requests

2 participants