0.1.6: fixed tests per language changes and .travis.yml.

This also switches to the crates.io dependency unconditionally.
This commit is contained in:
Kang Seonghoon 2014-12-25 16:46:00 +09:00
parent 7f5f176cce
commit bf4ded9f07
4 changed files with 20 additions and 21 deletions

View File

@ -6,9 +6,6 @@ env:
global: global:
- LD_LIBRARY_PATH: /usr/local/lib - LD_LIBRARY_PATH: /usr/local/lib
- secure: i8Ijk6g4/26e3e7+r2OeGAPSP8G8O9P50JibW1omJ0j0ixXhyhPoY2bch3CGhnOu44dI5O31IIbjJJ+iEMp29xQBvkv9YpxAI+hIzOP+XAH6GCYxUDiBVcDoWrXTj+wU6/veuvjLCunu4eRHlskrgJbZXhUVODYzJuLgsN8Ou0w= - secure: i8Ijk6g4/26e3e7+r2OeGAPSP8G8O9P50JibW1omJ0j0ixXhyhPoY2bch3CGhnOu44dI5O31IIbjJJ+iEMp29xQBvkv9YpxAI+hIzOP+XAH6GCYxUDiBVcDoWrXTj+wU6/veuvjLCunu4eRHlskrgJbZXhUVODYzJuLgsN8Ou0w=
before_script:
- rustc -v
- cargo -V
script: script:
- cargo build -v - cargo build -v
- cargo test -v - cargo test -v

View File

@ -1,11 +1,11 @@
[package] [package]
name = "chrono" name = "chrono"
version = "0.1.5" version = "0.1.6"
authors = ["Kang Seonghoon <public+rust@mearie.org>"] authors = ["Kang Seonghoon <public+rust@mearie.org>"]
description = "Date and time library for Rust" description = "Date and time library for Rust"
homepage = "https://github.com/lifthrasiir/rust-chrono" homepage = "https://github.com/lifthrasiir/rust-chrono"
documentation = "https://lifthrasiir.github.io/rust-chrono/chrono/" documentation = "https://lifthrasiir.github.io/rust-chrono/"
repository = "https://github.com/lifthrasiir/rust-chrono" repository = "https://github.com/lifthrasiir/rust-chrono"
keywords = ["date", "time", "calendar"] keywords = ["date", "time", "calendar"]
readme = "README.md" readme = "README.md"
@ -14,6 +14,6 @@ license = "MIT/Apache-2.0"
[lib] [lib]
name = "chrono" name = "chrono"
[dependencies.time] [dependencies]
git = "https://github.com/rust-lang/time" time = "0.1.4"

View File

@ -1,12 +1,12 @@
Chrono [Chrono][doc] 0.1.6
====== ===================
[![Chrono on Travis CI][travis-image]][travis] [![Chrono on Travis CI][travis-image]][travis]
[travis-image]: https://travis-ci.org/lifthrasiir/rust-chrono.png [travis-image]: https://travis-ci.org/lifthrasiir/rust-chrono.png
[travis]: https://travis-ci.org/lifthrasiir/rust-chrono [travis]: https://travis-ci.org/lifthrasiir/rust-chrono
Date and time handling for Rust. Date and time handling for Rust. (also known as `rust-chrono`)
It aims to be a feature-complete superset of the [time](https://github.com/rust-lang/time) library. It aims to be a feature-complete superset of the [time](https://github.com/rust-lang/time) library.
In particular, In particular,
@ -21,7 +21,9 @@ which Chrono builts upon and should acknowledge:
* Dietrich Epp's [datetime-rs](https://github.com/depp/datetime-rs) * Dietrich Epp's [datetime-rs](https://github.com/depp/datetime-rs)
* Luis de Bethencourt's [rust-datetime](https://github.com/luisbg/rust-datetime) * Luis de Bethencourt's [rust-datetime](https://github.com/luisbg/rust-datetime)
[Complete Documentation](https://lifthrasiir.github.io/rust-chrono/chrono/) [Complete Documentation][doc]
[doc]: https://lifthrasiir.github.io/rust-chrono/chrono/
## Overview ## Overview
@ -119,11 +121,11 @@ The default `to_string` method also gives a reasonable representation.
use chrono::{UTC, Offset}; use chrono::{UTC, Offset};
let dt = UTC.ymd(2014, 11, 28).and_hms(12, 0, 9); let dt = UTC.ymd(2014, 11, 28).and_hms(12, 0, 9);
assert_eq!(dt.format("%Y-%m-%d %H:%M:%S").to_string(), "2014-11-28 12:00:09".into_string()); assert_eq!(dt.format("%Y-%m-%d %H:%M:%S").to_string(), "2014-11-28 12:00:09".to_string());
assert_eq!(dt.format("%a %b %e %T %Y").to_string(), "Fri Nov 28 12:00:09 2014".into_string()); assert_eq!(dt.format("%a %b %e %T %Y").to_string(), "Fri Nov 28 12:00:09 2014".to_string());
assert_eq!(dt.format("%a %b %e %T %Y").to_string(), dt.format("%c").to_string()); assert_eq!(dt.format("%a %b %e %T %Y").to_string(), dt.format("%c").to_string());
assert_eq!(dt.to_string(), "2014-11-28T12:00:09Z".into_string()); assert_eq!(dt.to_string(), "2014-11-28T12:00:09Z".to_string());
~~~~ ~~~~
### Individual date and time ### Individual date and time
@ -141,7 +143,7 @@ assert_eq!(Local::today(), Local::now().date());
assert_eq!(UTC.ymd(2014, 11, 28).weekday(), Weekday::Fri); assert_eq!(UTC.ymd(2014, 11, 28).weekday(), Weekday::Fri);
assert_eq!(UTC.ymd_opt(2014, 11, 31), LocalResult::None); assert_eq!(UTC.ymd_opt(2014, 11, 31), LocalResult::None);
assert_eq!(UTC.hms_milli(7, 8, 9, 10).format("%H%M%S").to_string(), "070809".into_string()); assert_eq!(UTC.hms_milli(7, 8, 9, 10).format("%H%M%S").to_string(), "070809".to_string());
~~~~ ~~~~
`DateTime` has two methods, `date` and `time`, `DateTime` has two methods, `date` and `time`,

View File

@ -4,9 +4,9 @@
/*! /*!
# Chrono # Chrono 0.1.6
Date and time handling for Rust. Date and time handling for Rust. (also known as `rust-chrono`)
It aims to be a feature-complete superset of the [time](https://github.com/rust-lang/time) library. It aims to be a feature-complete superset of the [time](https://github.com/rust-lang/time) library.
In particular, In particular,
@ -122,11 +122,11 @@ The default `to_string` method also gives a reasonable representation.
use chrono::{UTC, Offset}; use chrono::{UTC, Offset};
let dt = UTC.ymd(2014, 11, 28).and_hms(12, 0, 9); let dt = UTC.ymd(2014, 11, 28).and_hms(12, 0, 9);
assert_eq!(dt.format("%Y-%m-%d %H:%M:%S").to_string(), "2014-11-28 12:00:09".into_string()); assert_eq!(dt.format("%Y-%m-%d %H:%M:%S").to_string(), "2014-11-28 12:00:09".to_string());
assert_eq!(dt.format("%a %b %e %T %Y").to_string(), "Fri Nov 28 12:00:09 2014".into_string()); assert_eq!(dt.format("%a %b %e %T %Y").to_string(), "Fri Nov 28 12:00:09 2014".to_string());
assert_eq!(dt.format("%a %b %e %T %Y").to_string(), dt.format("%c").to_string()); assert_eq!(dt.format("%a %b %e %T %Y").to_string(), dt.format("%c").to_string());
assert_eq!(dt.to_string(), "2014-11-28T12:00:09Z".into_string()); assert_eq!(dt.to_string(), "2014-11-28T12:00:09Z".to_string());
~~~~ ~~~~
### Individual date and time ### Individual date and time
@ -145,7 +145,7 @@ assert_eq!(Local::today(), Local::now().date());
assert_eq!(UTC.ymd(2014, 11, 28).weekday(), Weekday::Fri); assert_eq!(UTC.ymd(2014, 11, 28).weekday(), Weekday::Fri);
assert_eq!(UTC.ymd_opt(2014, 11, 31), LocalResult::None); assert_eq!(UTC.ymd_opt(2014, 11, 31), LocalResult::None);
assert_eq!(UTC.hms_milli(7, 8, 9, 10).format("%H%M%S").to_string(), "070809".into_string()); assert_eq!(UTC.hms_milli(7, 8, 9, 10).format("%H%M%S").to_string(), "070809".to_string());
~~~~ ~~~~
`DateTime` has two methods, `date` and `time`, `DateTime` has two methods, `date` and `time`,