jk-gan / aion

A friendly Rust utility crate for duration and datetime
MIT License
39 stars 0 forks source link

Feature: Add usize, i32 or i128 support as well #4

Open meven opened 4 years ago

meven commented 4 years ago

https://github.com/jk-gan/aion/blob/98105b686abc5e44426b23f2c7e8a1d64c7c4a77/src/lib.rs#L35

Nice utilit crate btw :)

jk-gan commented 4 years ago

Hi @meven , thanks for the suggestion. The reason why the crate now only support i64 is because it is using chrono::Duration, and Duration is only support for i64. Will check how to implement for other data types.

pickfire commented 4 years ago

@jk-gan What do you think about float?

0.5.hours()
jk-gan commented 4 years ago

I like the idea of using float. I can do it later.