hyperlane-time

Crates.iohyperlane-time
lib.rshyperlane-time
version0.7.8
created_at2024-12-29 04:16:07.962342+00
updated_at2025-08-24 13:12:25.463932+00
descriptionA library for fetching the current time based on the system's locale settings.
homepage
repositoryhttps://github.com/hyperlane-dev/hyperlane-time.git
max_upload_size
id1497949
size21,709
尤雨东 (eastspire)

documentation

README

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 root@ltpp.vip.

Commit count: 0

cargo fmt