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

Time calculator and formats (maybe two tickets here) #28

Open
sarev opened this issue Nov 13, 2013 · 2 comments
Open

Time calculator and formats (maybe two tickets here) #28

sarev opened this issue Nov 13, 2013 · 2 comments
Assignees

Comments

@sarev
Copy link

sarev commented Nov 13, 2013

Something which would be nifty as a new feature (even if this is massive feature creep) would be a time calculator for when you need to put something in for a task but figuring it out is fiddly.

E.g. 18:37 - 09:28

One thing (which may or may not be related) that I've noticed in another timesheet system is that you can enter either "6.25" or "6:15" forms - dot vs colon separator. It happens to force the answer to colon notation once you hit enter or move focus out of the cell - I expect TR would use dot notation as its default (as usual).

Maybe the latter feature could be a per-user option, because I know many folks will tend to think in HH:MM rather than our hours . fractions.

@pond
Copy link
Owner

pond commented Dec 18, 2013

Interesting idea to accept HH:MM style as well as 'integer.fraction', except for the ambiguities introduced if a user tried "HH.MM" because of their nationality (or any other format for that reason), or just accidentally. It could be a per-user option but I can still see users getting it wrong...

There's then the question of how far you extend this. Consider all the places where numbers are displayed or parsed - should it show HH:MM or fractions everywhere, including reports? Durations on tasks? CSV exports? It's a bit of a minefield to allow multiple representations. You'd really have to be ruthlessly consistent I think, applying that format at all times, which is a fair bit of code with an obvious performance implication (even though some of the display code for the current format is centralised, which would help at least on the implementation side, if not the performance side). It also creates accuracy in representation headaches, since 2 hours and 20 minutes expressed as "2:20" looks nice and neat, but "2.3333333333333..." less so!

On time calculation - is something like this any good, or too clumsy?

http://www.scottseverance.us/html/time_calculator.htm

@pond
Copy link
Owner

pond commented Jan 8, 2014

Splitting this.

The ticket herein tracks the idea of making it user-configurable to allow fractions input in the timesheet editor grid, HH:MM input into the grid, or a mixture auto-detected based on separator. I18n issues therein might make this untenable; see issue #33; unless it was just hard-coded to "." or ":" (which is very wrong for fractions, but I suspect it's hard-coded to "." anyway within at least the JavaScript layer as JS i18n support is dreadful).

See also Issue #34.

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

No branches or pull requests

2 participants