#timezone #chrono #circadian

yanked circadian_time

Circadian timezone support for chrono

3 releases

0.0.3 May 2, 2020
0.0.2 Dec 7, 2019
0.0.1 Dec 7, 2019

#93 in #chrono

MIT license

6KB
63 lines

Circadian Time

This crate adds support for the circadian timezone to chrono.

Documentation

Documentation can be found on docs.rs

Installation

$ cargo add circadian_time --version 0.0.1
$ cargo add circadia --version 0.0.1

Usage

use circadia::GlobalPosition;
use circadian_time::{Circadian, Positioned};

#[derive(Debug, Clone)]
struct SandyUtah;

impl Positioned for SandyUtah {
    fn position() -> GlobalPosition {
        GlobalPosition::at(40.60710285372043, -111.85515699873065)
    }
}

fn main() {
    let now = Circadian::<SandyUtah>::now();
    println!("{}", now.format("%T"));
}

lib.rs:

This crate adds support for the Circadian timezone to chrono. The Circadian timezone is aligned to the time of dawn as opposed to the time of noon. i.e. at dawn the Circadian time will be 00:00

Dependencies

~1MB
~18K SLoC