Bulk feature request: support timedeltas, milliseconds and below
I would like to use arrow's humanize() for the bold part of this:
Task has completed in 10 seconds. With 1000 subtasks, that is 10 milliseconds per subtask.
Currently, this seems hard for two reasons. First, from the start time that I stored, I need to compute the delta to now myself, divide the delta by 1000, subtract it from now, and then output that. That seems unncessarily complicated.
Second, everything below one second is "a moment" or something like that.
Or have I missed anything?
Hello @bersbersbers the first part could be achieved as;
start_date.humanize(only_distance=True)
'10 seconds'
For the second part I don't think humanize would be much help, seems like you want a custom function here.
Yes, that custom function is exactly what I am asking for - hence the "feature request" :) I am currently using humanize.naturaldelta() from https://github.com/jmoiron/humanize, it's just that that package is not maintained any longer.
Ah ok I think I understand what you mean now.
@jadchaar what do you think?
I think this could definitely be a great feature addition to Arrow. We could maybe combine this with dehumanize functionality in a future release.