tchar / ulauncher-albert-calculate-anything

A ULauncher/Albert extension that supports currency, units and date time conversion, as well as a calculator that supports complex numbers and functions.
MIT License
103 stars 13 forks source link

[feature] Timestamp calculation (not from today) #55

Open AlfredPianist opened 4 months ago

AlfredPianist commented 4 months ago

Is your feature request related to a problem?

I would like to do addition and subtraction using timestamps.

Describe the solution you'd like

= 1:8:59 + 8:11:32. The result would be 9:20:31.

This is a simple example with hours, minutes and seconds, but the idea is to extend this to multiple timestamps, support for timezones and milliseconds.

This is different from the time command in which you add or subtract from today as a timestamp, which is an awesome tool.

Describe alternatives you've considered

None that I've considered.

Additional context

Just a question, if it is possible. May I create a PR for this feature request? Do you think what I'm asking is possible within the constraints of this project? Thanks.

And thanks for this plugin. Really looking forward for this feature. It would help me a lot.

tchar commented 3 months ago

Hey @AlfredPianist

You are more than welcome to make a PR for this.

You mentioned that you don't want it under the time command. What do you think about the following?

The = command is for calculations of all sorts. You could add it there, but differentiating between the other calculations would be more challenging. To be more specific, the = command parses the user input differently than time, oct, dec, etc, and it is the most difficult one to update.

I understand that this feature is not exactly similar to the time command, but putting this functionality in time may be easier than putting it in = and would also make more sense.

Looking forward to hearing your thoughts.

Cheers.