14 releases (5 breaking)
Uses new Rust 2024
new 0.5.0 | Apr 13, 2025 |
---|---|
0.3.0 | Apr 13, 2025 |
0.2.1 | Mar 23, 2025 |
0.0.1 | Dec 29, 2024 |
#2220 in Network programming
1,329 downloads per month
Used in 8 crates
(2 directly)
20KB
324 lines
hyperlane-time
A library for fetching the current time based on the system's locale settings.
Installation
To use this crate, you can run cmd:
cargo add hyperlane-time
Use
use hyperlane_time::*;
println!("Current Time: {}", time());
println!("Current Date: {}", date());
println!("GMT Date: {}", gmt());
println!("Timestamp (s): {}", timestamp());
println!("Timestamp (ms): {}", timestamp_millis());
println!("Timestamp (μs): {}", timestamp_micros());
println!("Current Year: {}", year());
println!("Current Month: {}", month());
println!("Current Day: {}", day());
println!("Current Hour: {}", hour());
println!("Current Minute: {}", minute());
println!("Current Second: {}", second());
println!("Current Millis: {}", millis());
println!("Current Micros: {}", micros());
println!("Is Leap Year (1949): {}", is_leap_year(1949));
println!("Calculate Current Time: {:?}", calculate_time());
println!("Compute Date (10000 days): {:?}", compute_date(10000));
println!("Current Time with Millis: {}", time_millis());
println!("Current Time with Micros: {}", time_micros());
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Contact
For any inquiries, please reach out to the author at ltpp-universe root@ltpp.vip.