[][src]Trait isocal::IsoDate

pub trait IsoDate {
    fn week_fancy(self) -> String;
fn week0_fancy(self) -> String;
fn date(self) -> String;
fn date0(self) -> String; }

Required methods

fn week_fancy(self) -> String

fn week0_fancy(self) -> String

fn date(self) -> String

fn date0(self) -> String

Loading content...

Implementations on Foreign Types

impl IsoDate for IsoWeek[src]

fn week_fancy(self) -> String[src]

Returns the ISO week with a W prefix. The return value ranges from 0 to 53. (The last week of year differs by years.)

extern crate isocal; // Rust 2015
use isocal::IsoDate;
use chrono::{Local, IsoWeek, Datelike};

fn main() {
    let now = Local::now();
    let isow = now.iso_week();

    println!("{}", isow.week_fancy());
}

fn week0_fancy(self) -> String[src]

Returns the ISO week with a W prefix. The return value ranges from 0 to 52. (The last week of year differs by years.)

fn date(self) -> String[src]

Returns the ISO year and week. The week ranges from 0 to 53. (The last week of year differs by years.)

extern crate isocal; // Rust 2015
use isocal::IsoDate;
use chrono::{Local, IsoWeek, Datelike};

fn main() {
    let now = Local::now();
    let isow = now.iso_week();

    println!("{}", isow.date());
}

fn date0(self) -> String[src]

Returns the ISO year and week. The week ranges from 0 to 52. (The last week of year differs by years.)

Loading content...

Implementors

Loading content...