Commit Graph

271 Commits

Author SHA1 Message Date
Kang Seonghoon 0d8f836665 0.1.4: language changes and a small fix.
- `Copy` is now opt-in. Every `Copy`able type is made to implement
  `Copy`. While unlikely, I haven't deeply thought about
  `Copy`ability so it might change in 0.2.
- `Date::and_date` might behave incorrectly with a large `Offset`;
  this is now fixed.
- Added a BIG (friendly) limitation section to the README.
2014-12-13 22:17:04 +09:00
Kang Seonghoon 389e58f727 added BIG limitations section to the README. 2014-12-13 22:16:38 +09:00
Kang Seonghoon 407ad383c5 fixed an edge case with date-changing offsets. 2014-12-13 21:53:53 +09:00
Kang Seonghoon b4c0cd3dd1 Merge pull request #14 from klutzy/upstream
Update for upstream changes
2014-12-13 20:38:38 +09:00
klutzy 37d85ffd3b Update for upstream changes 2014-12-13 20:29:06 +09:00
Kang Seonghoon 342c23d40a well... we do not want those comments sneak into README :) 2014-11-29 00:47:50 +09:00
Kang Seonghoon 95bba43063 0.1.3: better offset conversion and additional APIs.
- better documentation :)
- `Offset::name` now returns `SendStr`.
- `Date/Time - Duration` is now supported.
- `with_offset` methods have been added.
- `LocalResult` now implements common traits.
- `LocalResult` has several methods to propagate errors.
  this makes the initialization from untrusted sources easier.
2014-11-28 23:55:00 +09:00
Kang Seonghoon 920a681d54 better documentation, some additional APIs.
- `Date/Time - Duration` is now supported. (duh!)
- `with_offset` methods have been added.
- `LocalResult` now implements common traits.
- `LocalResult` has several methods to propagate errors.
  this makes the initialization from untrusted sources easier
  (`off.ymd_opt(y,m,d).and_hms_opt(h,n,s).single()`).
2014-11-28 23:53:22 +09:00
Kang Seonghoon 9e6576e37e language changes: MaybeOwned is deprecated, long live CowString! 2014-11-28 21:32:14 +09:00
Kang Seonghoon 86665d0a7f 0.1.2: no more `num` dependency, multidispatched addition.
- `num` dependency is gone. It was only used for floored division
  and it is not hard to copy only that portion from num.
- `Duration + Date` (or so) was blocked by rust-lang/rust#7590,
  which has been subsequently fixed.
- Removed unused `unsafe` checks.
2014-11-24 14:52:07 +09:00
Kang Seonghoon 0a04ae1aa9 0.1.1: language changes, updated documentations.
- `std::fmt::WriteError` is now `std::fmt::Error`.
- abandoned rust-ci for documentations (sorry, but it didn't work
  nowdays ;_;), we are now publishing directly to Github pages.
2014-11-21 16:18:55 +09:00
Kang Seonghoon 6f2770d2bb added repository to Cargo.toml. 2014-11-20 13:23:33 +09:00
Kang Seonghoon e947b4eec6 language changes: str::shift_slice_char has been updated. 2014-11-20 13:09:16 +09:00
Kang Seonghoon ec6c874042 language changes: namespaced enums, no more std::num::{Zero,Bounded}. 2014-11-19 10:59:32 +09:00
Kang Seonghoon fdcaff7ce1 Merge pull request #8 from rcolinray/deny_missing_docs
Fix lint warning on deny(missing_doc)
2014-11-03 09:39:50 +09:00
Colin Ray fd5f8b7f34 Fix lint warning on deny(missing_doc) 2014-11-02 17:03:19 -06:00
Kang Seonghoon 62e41178ff Merge pull request #7 from steveklabnik/master
fail -> panic
2014-10-30 13:33:18 +09:00
Steve Klabnik 59892f1511 fail -> panic 2014-10-30 00:23:09 -04:00
Kang Seonghoon c8967119af Merge pull request #6 from Kroisse/master
Follow rustc master (1add4dedc 2014-10-10)
2014-10-12 00:59:43 +09:00
Eunchong Yu 850e1d8654 Follow rustc master (1add4dedc 2014-10-10) 2014-10-12 00:56:49 +09:00
Kang Seonghoon ad60081dc0 use a Cargoified version of libnum. 2014-10-10 15:01:31 +09:00
Kang Seonghoon 3604e59147 added a link to the generated documentation. fixes #5. 2014-09-14 14:29:55 +09:00
Kang Seonghoon d6e0c3f266 language changes: `extern crate A = "B";` -> `extern crate "B" as A;`. 2014-09-12 18:53:06 +09:00
Kang Seonghoon 10c580f664 switches to std::time::duration::Duration. 2014-08-31 14:43:26 +09:00
Kang Seonghoon 80ed400689 added missing `.offset()` methods; UTC/FixedOffset now implement Eq. 2014-08-29 18:14:08 +09:00
Kang Seonghoon 31696204e7 simplified .travis.yml. 2014-08-27 01:30:00 +09:00
Kang Seonghoon 417f6ebdcf fixed .travis.yml to use the correct URL for Cargo nightly. 2014-08-21 09:31:15 +09:00
Kang Seonghoon 86259a120f language changes: an array size now needs to be uint. 2014-08-19 21:52:58 +09:00
Kang Seonghoon f1931ad21e added `chrono::format` module and `format` methods.
this is a saner replacement for `time::strftime`; it does not allocate
the additional memory.
2014-08-01 04:08:19 +09:00
Kang Seonghoon ed71a1037b made `Time::fmt` to use the same decimal separator as `Duration::fmt`. 2014-07-31 11:03:32 +09:00
Kang Seonghoon ead13f66d8 added the Local offset implementation. 2014-07-31 11:02:20 +09:00
Kang Seonghoon 9d52c6d2f1 added constructors from timestamp; added `UTC::{today,now}`. 2014-07-31 10:09:54 +09:00
Kang Seonghoon 55d5d49f1c updated .travis.yml to use `cargo doc` for doc generation. 2014-07-29 16:23:29 +09:00
Kang Seonghoon 95f5c0c095 splitted naive types into their own modules. 2014-07-29 16:17:26 +09:00
Kang Seonghoon 586b41df54 mass renaming from `BlahBlahZ` to `NaiveBlahBlah`. 2014-07-29 15:55:40 +09:00
Kang Seonghoon 32c3ee85e8 initial `Offset` implementations. 2014-07-29 15:41:47 +09:00
Kang Seonghoon 07d98709df fixed a bug on `DateTimeZ::add` with the negative fractional `Duration`. 2014-07-29 15:38:24 +09:00
Kang Seonghoon c7c3052892 made every type `Clone`able; added `and_*` constructors to `DateZ`.
it allows for, say, `DateZ::from_ymd(2014,1,2).and_hms(3,4,5)`.
2014-07-29 15:36:35 +09:00
Kang Seonghoon f77c8435c2 changed the internal representation of TimeZ. 2014-07-29 01:05:30 +09:00
Kang Seonghoon 4f34003e03 relicensed from MIT to dual MIT/APL2. closes #2. 2014-07-25 21:25:10 +09:00
Kang Seonghoon d5f652e656 renamed `n<foo>s` to `num_<foo>s` and changed their semantics.
`Duration` now has a `to_tuple` method which corresponds to
the original `(dur.ndays(), dur.nseconds(), dur.nnanoseconds())`.
new `num_*s()` methods in `Duration` always return the integral
number of specified units in the duration.

cf. rust-lang/rust#15934
2014-07-25 21:00:32 +09:00
Kang Seonghoon 9300f2481c renamed `chrono:📅:{MIN,MAX}` to `chrono:📅:{MINZ,MAXZ}`.
this is because we are going to add `MIN` and `MAX` for
timezone-aware `Date`s later.
2014-07-25 19:24:32 +09:00
Kang Seonghoon 4dbd00dca2 added all missing docs. 2014-07-25 18:12:51 +09:00
Kang Seonghoon 2f35fbc0fd changed the decimal point from `,` to `.`. (cf. rust-lang/rust#15934)
ISO 8601 allows for both but prefers `,`, which was a main reason
for its use in rust-chrono. but this is too alien given other usages of
decimal points in Rust, so I guess it is better to switch to `.`.
2014-07-25 17:35:49 +09:00
Kang Seonghoon 110c7de7d3 added docs to `Duration`; added `Duration::new_opt`; removed `{MIN,MAX}_{DAYS,YEAR}`.
the minimum and maximum for `DateZ` and `Duration` is now provided via
dedicated constants `{date,duration}::{MIN,MAX}`, much like built-in
`std::int` and others. they also now implements `std::num::Bounded`.

cf. rust-lang/rust#15934
2014-07-25 17:05:26 +09:00
Kang Seonghoon f7065f1625 fixed erratic `fmt` behaviors with format specifiers. (rust-lang/rust#15934) 2014-07-25 16:20:39 +09:00
Kang Seonghoon b79f6b302b major API surgeries.
- added a new example.
- reexported all public APIs in the crate root.
- made all constructors fail on the invalid arguments by default;
  `*_opt()` variants have been added for the original behavior.
- same for `DateZ::{succ,pred}`.
- fixed a missing overflow check from `TimeZ::from_hms_{milli,micro}`.
2014-07-20 02:51:57 +09:00
Kang Seonghoon dce4ec8f45 the public API now uses i32/u32 instead of int/uint for integers.
closes #1.
2014-07-20 02:00:33 +09:00
Kang Seonghoon b5a2340214 updated .travis.yml to use install.sh for Cargo; src/chrono -> src. 2014-07-15 13:20:48 +09:00
Kang Seonghoon 39d723fc6f eliminated #![feature(globs)]. 2014-07-15 12:53:40 +09:00