https://github.com/tonytins/isocal
IsoCal is an extension to Chrono's IsoWeek (ISO 8601) struct that provides additional formatting and functions, such as the "W" prefix to weeks and the ISO ordinal.
https://github.com/tonytins/isocal
datetime finance government rust rust-library utc week
Last synced: 2 months ago
JSON representation
IsoCal is an extension to Chrono's IsoWeek (ISO 8601) struct that provides additional formatting and functions, such as the "W" prefix to weeks and the ISO ordinal.
- Host: GitHub
- URL: https://github.com/tonytins/isocal
- Owner: tonytins
- License: apache-2.0
- Created: 2020-02-01T17:39:08.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-10-28T18:20:56.000Z (over 2 years ago)
- Last Synced: 2026-01-02T12:12:54.553Z (5 months ago)
- Topics: datetime, finance, government, rust, rust-library, utc, week
- Language: Rust
- Homepage:
- Size: 44.9 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IsoCal

IsoCal is an extension to Chrono's IsoWeek (ISO 8601) that provides additional formatting and functions, such as the "W" prefix to weeks and the ISO ordinal.
## Requirements
- Rust 2021 Edition or newer
- IDEs or Editors
- [Visual Studio Code](https://code.visualstudio.com/) or [VSCodium](https://vscodium.com/)
- [InteliJ IDEA Ultimate](https://www.jetbrains.com/idea/) or [RustOver](https://www.jetbrains.com/rust/)
## Installation
```toml
[dependencies]
chrono = "0.4"
isocal = "1"
```
## Usage
```rust
use chrono::prelude::*;
use isocal::IsoDate;
fn main() {
let now = Local::now();
let isow = now.iso_week();
println!("{}", isow.week_fancy());
}
```
## To-do
- [ ] Target Rust 2024 Edition
## License
This project is dual-licensed under the [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE).