-
Notifications
You must be signed in to change notification settings - Fork 78
Durationformatter: Feature proposal #444
Comments
What should happen if the input is smaller than the output unit?
And to double-check: What happens if the input is zero? |
Will this also work for rate units? |
Good point. |
@dlaubi-dt Good morning, first I want to apologize for the late response. I couldn't come to the office on Friday. DEFAULT || undefined
PRECISE
@jsjsat (&& @dlaubi-dt) Good morning, can you elaborate on the rate s/min? I'm not quite sure what that means tbh ^^ |
…onfiguration. Fixes #444 BREAKING CHANGE: Removed experiementalFormatTime and DtExperimentalFormatTime in favor of dtDuration pipe.
…onfiguration. Fixes #444 BREAKING CHANGE: Removed experiementalFormatTime and DtExperimentalFormatTime in favor of dtDuration pipe.
…onfiguration. Fixes #444 BREAKING CHANGE: Removed experiementalFormatTime and DtExperimentalFormatTime in favor of dtDuration pipe.
…onfiguration. Fixes #444 BREAKING CHANGE: Removed experiementalFormatTime and DtExperimentalFormatTime in favor of dtDuration pipe.
…onfiguration. Fixes #444 BREAKING CHANGE: Removed experiementalFormatTime and DtExperimentalFormatTime in favor of dtDuration pipe.
Durationformatter Feature proposal
Feature proposal
The DtDurationFormatter converts an input duration to an output duration. Both
the input and output units are configurable. Additionally, it has support for
precision/mode concerning how the output is displayed.
Precisionmodes
Pipesyntax:
The duration formatter pipe will cover the use cases below:
Default mode:
It will only display two units from the biggest unit that has a value.
InputUnit is set to milliseconds by default
outputUnit not specified ('DEFAULT':undefined:undefined):
outputUnit not specified ('DEFAULT':undefined:undefined):
outputUnit specified ('DEFAULT' :'s': undefined):
outputUnit specified ('DEFAULT' :'s': undefined):
outputUnit specified AND inputUnit specified ('DEFAULT':'s':'h'):
Precise mode:
outputUnit not specified:
outputUnit is seconds:
Custom amount of displayed units
Precision set to 2:
Precision set to 5:
The text was updated successfully, but these errors were encountered: