Open antidote2 opened 6 years ago
Hello, you can check out https://github.com/urish/ngx-moment for all pipes related to time and durations.
I already checked and it actually fits special cases. Don't like their humanize method. I want to be able to cast exactly the output that I need. Simple configurable pipes would do that. No need for humanize magic. https://github.com/urish/ngx-moment/blob/master/src/duration.pipe.ts
What exactly is your request? (e.g. use case, since milliseconds is not something most people would use)
I want to provide a duration value together with units: like 60000 + ms or 15.43 + min. As output I would expect a similar simple conversion like is done for bytes/KB/MB/GB... As human you don't want to see 60000 ms - you want to see 1 min. moment.js produces for 1-2 seconds "a few seconds". You cannot use this for a datatable.
Thank you! I like this library! Did I miss something or why duration pipes are not included. I would like to be able to convert for example milliseconds to minutes. value_in_ms = 60000; {{value_in_ms | duration: ms: min}} would print "1 min"