ruby-duration icon indicating copy to clipboard operation
ruby-duration copied to clipboard

miliseconds

Open benlieb opened this issue 10 years ago • 6 comments

Di you plan on implementing miliseconds? I started using this for an ffmpeg video editing project, and a lot can happen in a second on film. Ffmpeg has a function that tells you where a video fades to black at say at second 3535.3432. I wanted to store and manipulate these as Duration objects, but it's just not fine grained enough. Seem like a useful thing to have.

Any thoughts?

benlieb avatar May 30 '14 02:05 benlieb

I've come back to check on this. If I submitted a pull request would you be interested in this functionality?

benlieb avatar Aug 28 '14 19:08 benlieb

Not really. Adding microseconds would make this incompatible with ISO_8601.

peleteiro avatar Dec 25 '14 11:12 peleteiro

I'm curious how supporting milliseconds would break compatibility with ISO 8601 durations? From the Wikipedia article linked above:

The smallest value used may also have a decimal fraction, as in "P0.5Y" to indicate half a year.

Thus, 237ms could be expressed in a ISO 8601-compatible format as P0.237S.

pkaeding avatar Dec 28 '14 00:12 pkaeding

My mistake, you're right. I'm fine with microseconds. You can submit the PR.

peleteiro avatar Dec 29 '14 22:12 peleteiro

I've come come back again to check on this, haha. But I guess neither I nor anyone else has had the time to implement micro / milliseconds. :(

benlieb avatar Jul 02 '18 17:07 benlieb

I don't use ruby either this lib anymore. If someone else wants to implement microseconds and/or take over the project let me know.

peleteiro avatar Jul 05 '18 16:07 peleteiro