diff --git a/.gitignore b/.gitignore index e186bfc..be20a11 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,4 @@ build Makefile *-test -doc +doc diff --git a/.travis.yml b/.travis.yml index d5bf616..6405376 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +env: + global: + - secure: i8Ijk6g4/26e3e7+r2OeGAPSP8G8O9P50JibW1omJ0j0ixXhyhPoY2bch3CGhnOu44dI5O31IIbjJJ+iEMp29xQBvkv9YpxAI+hIzOP+XAH6GCYxUDiBVcDoWrXTj+wU6/veuvjLCunu4eRHlskrgJbZXhUVODYzJuLgsN8Ou0w= before_install: - yes | sudo add-apt-repository ppa:hansjorg/rust - sudo apt-get update @@ -10,3 +13,5 @@ script: branches: only: - master +after_script: + - curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..1a57c90 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014, Kang Seonghoon. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..420be2b --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +Rust-chrono +=========== + +[![Rust-chrono on Travis CI][travis-image]][travis] + +[travis-image]: https://travis-ci.org/lifthrasiir/rust-chrono.png +[travis]: https://travis-ci.org/lifthrasiir/rust-chrono + +Date and time handling for Rust. + +Design Goals +------------ + +* 1-to-1 correspondence with ISO 8601. +* Timezone-aware by default. +* Space efficient. +* Moderate lookup table size, should not exceed a few KBs. +* Avoid divisions as long as possible. + +References +---------- + +* https://github.com/mozilla/rust/wiki/Lib-datetime +* https://github.com/luisbg/rust-datetime/wiki/Use-Cases + diff --git a/src/chrono/date.rs b/src/chrono/date.rs index 6065cc4..253d110 100644 --- a/src/chrono/date.rs +++ b/src/chrono/date.rs @@ -1,3 +1,7 @@ +// This is a part of rust-chrono. +// Copyright (c) 2014, Kang Seonghoon. +// See README.md and LICENSE.txt for details. + /*! * ISO 8601 calendar date. */ diff --git a/src/chrono/datetime.rs b/src/chrono/datetime.rs index 44f79fe..fd9127d 100644 --- a/src/chrono/datetime.rs +++ b/src/chrono/datetime.rs @@ -1,3 +1,7 @@ +// This is a part of rust-chrono. +// Copyright (c) 2014, Kang Seonghoon. +// See README.md and LICENSE.txt for details. + /*! * ISO 8601 date and time. */ diff --git a/src/chrono/duration.rs b/src/chrono/duration.rs index fcf8f1f..955bd7a 100644 --- a/src/chrono/duration.rs +++ b/src/chrono/duration.rs @@ -1,3 +1,7 @@ +// This is a part of rust-chrono. +// Copyright (c) 2014, Kang Seonghoon. +// See README.md and LICENSE.txt for details. + /*! * ISO 8601 duration. */ diff --git a/src/chrono/lib.rs b/src/chrono/lib.rs index 994ce0d..6986ca2 100644 --- a/src/chrono/lib.rs +++ b/src/chrono/lib.rs @@ -1,5 +1,11 @@ +// This is a part of rust-chrono. +// Copyright (c) 2014, Kang Seonghoon. +// See README.md and LICENSE.txt for details. + #![crate_id = "chrono#0.1.0"] #![crate_type = "lib"] +#![comment = "Date and time library for Rust"] +#![license = "MIT"] #![feature(globs, macro_rules)] diff --git a/src/chrono/time.rs b/src/chrono/time.rs index 1c5cb08..3235adf 100644 --- a/src/chrono/time.rs +++ b/src/chrono/time.rs @@ -1,3 +1,7 @@ +// This is a part of rust-chrono. +// Copyright (c) 2014, Kang Seonghoon. +// See README.md and LICENSE.txt for details. + /*! * ISO 8601 time. */