Crates.io | date_utils |
lib.rs | date_utils |
version | 0.0.6 |
source | src |
created_at | 2022-10-13 01:14:30.968443 |
updated_at | 2024-07-11 04:05:19.907387 |
description | the date utils package |
homepage | |
repository | https://github.com/hackers267/date_utils.git |
max_upload_size | |
id | 686805 |
size | 225,537 |
The date_utils is a package with a set of functions that operate on the date.Date-Utils is a powerful date and time manipulation library for Rust that relies on the well-known chrono
library. Inspired by JavaScript's date-fns
, this library aims to provide Rust developers with a rich set of features and an intuitive API.
Key features include:
chrono
for comprehensive and precise date and time handling capabilities.chrono
.To get started, add the dependencies to your Cargo.toml
file:
[dependencies]
date-utils = "0.1"
chrono = "0.4"
Then, import and use the library in your Rust code:
use date_utils::{DateUtils, FormatItem};
use chrono::prelude::*;
fn main() {
let now: DateTime<Utc> = Utc::now();
let formatted_date = DateUtils::format(now, &[FormatItem::Year, FormatItem::Month, FormatItem::Day]);
println!("Today's date is: {}", formatted_date);
}
Detailed API documentation and usage examples can be found in the project's official documentation.
Contributions and feedback from the community are welcome. If you encounter any issues or have suggestions for new features, please submit an issue or pull request.
The library is released under the GPL-3.0 License. For more information, refer to the LICENSE file.
Let's enjoy seamless date and time manipulation experiences in Rust! 🎉