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

[FEATURE] Time computations #43

Open
tommens opened this issue Feb 9, 2022 · 0 comments
Open

[FEATURE] Time computations #43

tommens opened this issue Feb 9, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@tommens
Copy link
Owner

tommens commented Feb 9, 2022

Describe the new functionality you would like to see
It would be nice to be able to compute different time intervals. For instance:

How many hours have elapsed since 18:52?
How long was the interval between may 5, 2020 19:30:32 and march 2, 2020 18:31:19?
Date format is up to the choice of the student, but the ISO format (YYYY-MM-DD) is recommended.
Both the 24-hour and 12-hour time formats need to be taken into account. They can be mixed in requests: e.g. the calculator should be able to answer "03:54 PM - 11:54 = 4 hours".

The application should be able to provide the answer in a unit requested by its user, with the remainder being expressed either fractionally or through sub-units: 2020-05-05 19:30:32 - 2020-03-02 18:31:19 can be expressed as either "64 days, 0 hours, 59 minutes and 13 seconds" or "64.04 days" or "92219 minutes" or "5533153 seconds", ...

Timezones should be taken into account: "05:27 PM CET+0 - 05:27 PM CET+12 = 12 hours".

Subtraction and addition (what day will it be in 173 days?) make sense, multiplication and division do not. Therefore, those operations should not be possible with time computations.

If the user does not specify a start date or time, the current date/time is used. So, a unary request such as "- 18:52" or "+ 00:01" should give the user the time it was 18 hours and 52 minutes ago or the time it'll be in one minute. In this case, the INFIX notation can be considered equivalent to the PREFIX notation.

@tommens tommens added the enhancement New feature or request label Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant