WTIME
WTIME provides a variety of functions for obtaining the current UTC and local times, as well as generating customizable timestamps to suit your needs.
Table of Contents
Installation
Run the following Cargo command in your project directory:
cargo add wtime
Or add wtime to your Cargo.toml file:
[]
= "MAJOR.MINOR.PATCH" # Replace with the latest version
Features
-
Current Time Retrieval
- UTC and Local Time: WTIME offers seamless access to both current UTC and local times, making it easy to work with time zones and coordinate time-related functionalities.
-
Customizable Timestamps
- Flexible Formatting: Generate timestamps in various formats to meet your specific requirements, whether for logging, database entries, or user interfaces.
- Configuration Options: Tailor timestamp outputs to include or exclude specific components (e.g., date, time, time zone) based on your project needs.
-
Time Zone Support
- Multiple Time Zones: Easily convert between different time zones, allowing for applications that require global time management.
- Daylight Saving Time Adjustments: Automatic adjustments for daylight saving time ensure that your applications reflect accurate local time.
-
Easy Integration
- User-Friendly API: The WTIME API is designed with simplicity in mind, allowing developers to implement time-related functions with minimal effort.
- Comprehensive Documentation: Well-documented functions and examples help users quickly understand how to leverage the crate effectively.
-
High Performance
- Efficiency: WTIME is optimized for performance, ensuring that time retrieval and manipulation operations are fast and resource-friendly.
- Lightweight: The crate is designed to be lightweight, minimizing overhead while providing extensive functionality.
Usage
use ;
Documentation
UTC
| Function | Function | Function |
|---|---|---|
| calculate_date | duration_since | get_day |
| get_day_name | get_hour | get_millis |
| get_minute | get_month | get_month_name |
| get_nanos | get_second | get_year |
| is_leap_year | utc_now | utc_ts_millis |
| utc_ts_nanos | utc_ts_sec | - |
License
This project is licensed under either of the following licenses:
- MIT License
- Apache License, Version 2.0
You may choose either license for your purposes.
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any feature requests or bug reports.