abstract time crate
sigmaSd opened this issue · comments
Salam, thanks for your work!
Just wondering, shouldn't you abstract time crate instead of making users of your crate depend on it?
For example , users will need time::Duration
and time::now
you can reexport them with pub use time::{Duration,now}
so anyone who uses your crate can just use ptime::{Duration,now]
and more importantly doesn't have to add time crate.
Salam, thank you for opening this issue, you are right, but I think it is not a good idea to reexport time
sub modules.
Unfortunately, I have no time to edit this create, please feel free to open a pull required :)
salam, thanks for this interesting project
the time crate is deprecated, though
have you guys looked at chrono yet?
salam, I used chrono
in a similar project https://github.com/sigmaSd/HijriDate-rs, so I guess we can change the dependency to chrono
, but since time
does the job already, the question becomes should we?^^ + the developer didn't check in for a while now so probably things wont change for a while .
I'd say if you have the interest and skills to drive the project forward, then take charge.
If Navid comes back and likes what you've done, then he can merge your changes to his copy as well as whatever changes he makes in the future; and we'd all be better off.
With respect to replacing time
with chrono
, I believe it would be beneficial, because then any project that uses chrono
already (as they should instead of time
) and this project, would only use fresh code.
We should open a new issue for replacing time with chrono