#language #day #time #hyperlane #format

hyperlane-time

A library for fetching the current time based on the system's locale settings

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

Download history 348/week @ 2024-12-29 485/week @ 2025-01-05 156/week @ 2025-01-12 421/week @ 2025-01-19 15/week @ 2025-01-26 96/week @ 2025-02-02 331/week @ 2025-02-09 185/week @ 2025-02-16 142/week @ 2025-02-23 582/week @ 2025-03-02 444/week @ 2025-03-09 545/week @ 2025-03-16 417/week @ 2025-03-23 127/week @ 2025-03-30 130/week @ 2025-04-06

1,329 downloads per month
Used in 8 crates (2 directly)

MIT license

20KB
324 lines

hyperlane-time

Official Documentation

Api Docs

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.

No runtime deps