obsidian-tracker
obsidian-tracker copied to clipboard
Support mixed time values/units in summary
I use time values for a variable in two daily notes, one in the format of 39min
and another 00:30:00
. For this, I get wrong results, as shown in the figure:
If I use min
as the unit in both daily notes, I get the following result:
Further tests show that it seems time value of the format 00:30:00
is not supported when creating a summary of the form above, as it does not give correct results even if one use 00:30:00
in both notes.
Hi @wenlzhang, Thanks for the report. Will check it.
Is it possible to do some kind of automatic unit conversion for timing info in summary? For instance, values may be created in the format of 00:30:00
or 30min
. When summing all the values up, one may want to display the info in the format of hours, days, etc., e.g. 2 hour
, 2 day
, etc.
@wenlzhang, I have checked it, you are right.
The summary
output does not accept time values as input for now.
Will fix it.
Also, it's hard to make use of 00:30:00 and 30min together. I suggest you use one format for one specific target. For the case of '30 min', Tracker will retrieve the the number of 30 only, not knowing what the unit is. There are too many possibility for units a user can use. For the case of '00:30:00', Tracker can treat it as a time value, but we cannot mixed the two value types.
For the format of a time value output string , it's doable, will add it.
Also, it's hard to make use of 00:30:00 and 30min together.
I understand that a mixture of them can be difficult to implement.
For the format of a time value output string , it's doable, will add it.
Looking forward to this! 😃
I just realized that it's related to the duration value which we didn't support currently. Will implement it in the next major release.
Indeed. I also realize that values of the format 00:03:00
are not actually intercepted as durations, but as time values.
This comment not about the summary, but about the source data: I have years of duration data in human-friendly format of, for example, "5h 30m" (for 5 hours and 30 minutes), and “15m” for 15 minutes. Is it possible to implement a duration interpreter that can parse Hours (%H) and Minutes (%M) and Seconds (%S) if desired from arbitrary strings? (use strptime?) The only currently acceptable "%H:%M:%S" format is ugly for me because it looks like a time, not a duration. I use "%Hh %Mm” and "%Mm” if < 1 hour. Other people, like above, might use “%M min”.