calculator icon indicating copy to clipboard operation
calculator copied to clipboard

Add support for time in date calculations

Open ialhashim opened this issue 6 years ago • 15 comments

Problem Statement

The date calculation feature is useful but lacks the option to include the time of day. Also, it would be nice to have a deadline countdown feature.

Evidence or User Insights

Instead of going online to compute event duration or deadlines online, we can do it offline with the calculator.

Proposal

It will enable the computation of different forms of time difference operations.

Goals

It will help users see the exact time taken for some event until another time/date. It will also help track a countdown or deadline in some other timezone.

Non-Goals

Low-Fidelity Concept

A lot of functionality is at https://www.timeanddate.com

ialhashim avatar Mar 07 '19 05:03 ialhashim

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

MicrosoftIssueBot avatar Mar 07 '19 06:03 MicrosoftIssueBot

Thanks for the feature suggestion! This is really well thought-out, and we really appreciate it. Let's keep this idea open for discussion so the community has the chance to provide feedback. Check out our New Feedback Process for more info on the user-centered process we follow for new feature development.

The date calculation feature is useful but lacks the option to include the time of day. Also, it would be nice to have a deadline countdown feature.

To me, these feel like they might be two distinct ideas. Would you agree? If so, we prefer to file separate suggestion for each idea so we can discuss them indvidually.

grochocki avatar Mar 07 '19 07:03 grochocki

Thanks for the feature suggestion! This is really well thought-out, and we really appreciate it. Let's keep this idea open for discussion so the community has the chance to provide feedback. Check out our New Feedback Process for more info on the user-centered process we follow for new feature development.

The date calculation feature is useful but lacks the option to include the time of day. Also, it would be nice to have a deadline countdown feature.

To me, these feel like they might be two distinct ideas. Would you agree? If so, we prefer to file separate suggestion for each idea so we can discuss them indvidually.

I like your idea of including the time of day!

deadline countdown feature

What's the difference with the Countdown feature available in the Alarm&Clock app? image

rudyhuyn avatar Mar 07 '19 08:03 rudyhuyn

What's the difference with the Countdown feature available in the Alarm&Clock app?

I think what he wants to do is set an alarm at a specific date and time, and then have a countdown timer until the alarm triggers.

chibicitiberiu avatar Mar 07 '19 10:03 chibicitiberiu

@grochocki is right, they are two features. One is a small change by adding a time field (and hopefully a time zone option). The other is not a timer per se, just shows the relative "distance" to an exact time (and time zone). So it just shows a +/- days, hours, minutes from NOW.

ialhashim avatar Mar 07 '19 10:03 ialhashim

date calculations can be tricky, especially with daylight saving zones.

Note that a day is not always 24 hours, so we need to think about things like what it means to add any time span to a given timestamp.

Also a year is not always the same length, so converting one year into months/weeks/days/etc. would lead to different results.

MovGP0 avatar Mar 07 '19 17:03 MovGP0

We reviewed the pitch and would love to explore this idea further! I think this pitch is a great start, but there are still some open questions. Moving this into planning to iron out some of the details. Keep in mind that not all ideas that make it into the planning phase are guaranteed to make it to release.

A couple top-of-mind open questions:

  • To what extent, if at all, do we allow users to customize the timezone? Should calculations be timezone agnostic? Can they be?
  • How do we extend the existing date calculator to optionally support time (e.g., new mode, checkbox in existing date calculator mode, etc.)?

Let's focus on just the part of the pitch that adds times to the date calculator. That is, the part of the pitch that suggests adding a deadline countdown is out of scope for now. If you do not think the Alarms & Clock apps covers the scenario you have in mind, consider submitting a new issue to discuss that idea separately. I've updated the title to reflect this scoping.

I created calculator-specs/datetimecalculator to track progress. For more information on next steps, check out our spec workflow.

grochocki avatar May 21 '19 01:05 grochocki

This pitch looks like it has everything it needs for review. In the meantime, we'll keep this idea open for discussion so the community has the chance to provide feedback. Check out our New Feedback Process for more info on the user-centered process we follow for new feature development.

ghost avatar May 25 '19 01:05 ghost

Problem Statement

The date calculation feature is useful but lacks the option to include the time of day. Also, it would be nice to have a deadline countdown feature.

Evidence or User Insights

Instead of going online to compute event duration or deadlines online, we can do it offline with the calculator.

Proposal

It will enable the computation of different forms of time difference operations.

Goals

It will help users see the exact time taken for some event until another time/date. It will also help track a countdown or deadline in some other timezone.

Non-Goals

Low-Fidelity Concept

A lot of functionality is at https://www.timeanddate.com

I believe it should be in the converter section as TimeZone converter. Please refer the below images for a rough idea.

Screenshot (145)

The same image with some description:

Screenshot (145) with description

kashif-khan avatar Sep 10 '19 07:09 kashif-khan

I agree that if you factor in time zones, it behaves more like a converter, though Alarms & Clock already supports this world clock view:

image

I think it is reasonable to possibly add time zone support here too, but, but from the generic date/time calculator perspective, I think it might be simpler to treat all calculations in local time, and leave the time zone conversion separate. That could be a standalone time converter, or perhaps there is a way to convert the output of date/time calculator to a specific timezone from local time.

grochocki avatar Sep 10 '19 19:09 grochocki

This is nice. I would like to work on this please

Chips1234 avatar Jul 10 '20 21:07 Chips1234

I don't get how the engine works. Nevermind, I won't work on it. But can someone else maybe work on this?

Chips1234 avatar Jul 10 '20 22:07 Chips1234

I opened a similar order on May 21, 2020. https://github.com/microsoft/calculator/issues/1241
And today I saw that it was closed because it is similar to this request that is previous. I would like to register here is my need, and that of other people who work with subtitle, audio and video timing. The calculations we make do not include a date. Just hours, minutes, seconds and milliseconds. It would use the 24-hour standard, or military standard. HH:MM:SS.mmm The milliseconds would be a kind of pennies or cents for a normal blender. Something after the point or dot. If you enter 1234 you will have 00:12:24.000 If you enter 123456 you will have 12:34:56.000 If you enter 1234.789 you will have 00:12:34.789 And of course, do the 4 operations. + - * / In my request, I asked for a tab similar to the calculation of dates, but only for calculating Time. It seems that this order here is combining the two factors: Date and Time. I just hope that, due to the Time Zone difficulties reported here, this ability to calculate hours will not be implemented. Maybe do it in two steps. First a tab to calculate time. And then add to the date calculation the possibility to calculate with Date+Time.

ticao2 avatar Jul 21 '20 17:07 ticao2

Comodore pocket calculators did proper time calculations. Don't see a reason for not implementing something similar.

YouTube: Calculators for embedded systems engineers and programmers

MovGP0 avatar Aug 06 '20 18:08 MovGP0

Hello, I need just to calculate today working time. For example: I come to office at 8:45 and leave at 21:11. How many hours and minutes I spent today in office? In the calculator should be simple operation "21:11-8:45= " Why for that simple update need about 5 years? I will build my own app faster then update.

Redant-Hana avatar Mar 13 '25 06:03 Redant-Hana