about summary refs log tree commit diff
path: root/src/libtime
AgeCommit message (Collapse)AuthorLines
2014-09-03libtime: Fix adding negative duration to Timespec.Ruud van Asseldonk-0/+9
2014-08-29libtime: Use Duration in Timespec arithmetic.Ruud van Asseldonk-22/+22
2014-08-26Rebasing changesNick Cameron-32/+5
2014-08-26Use the slice repr for ~[T]Nick Cameron-5/+31
2014-08-18libtime: Implement Add and Sub for Timespec.Ruud van Asseldonk-1/+67
2014-08-02time::Tm should impl Eq in addition to PartialEqDaniel Brooks-1/+1
2014-08-02auto merge of #16164 : anguslees/rust/rfc3999, r=alexcrichtonbors-1/+1
Fixes #16158
2014-08-01Change strptime::match_strs to use borrowed rather than owned stringsAngus Lees-59/+45
Also modernise a few constructs in match_strs().
2014-08-01Correct RFC reference in time::Tm::rfc3339 docsAngus Lees-1/+1
Fixes #16158
2014-07-22auto merge of #15867 : cmr/rust/rewrite-lexer4, r=alexcrichtonbors-8/+8
2014-07-21ignore-lexer-test to broken files and remove some tray hyphensCorey Richardson-8/+8
I blame @ChrisMorgan for the hyphens.
2014-07-15Fix errorsAdolfo Ochagavía-1/+0
2014-07-15Deprecate `str::from_char`Adolfo Ochagavía-4/+2
Use `String::from_char` or `.to_str` instead [breaking-change]
2014-07-15Deprecate `str::from_utf8_owned`Adolfo Ochagavía-1/+1
Use `String::from_utf8` instead [breaking-change]
2014-07-11Update doc URLs for version bumpBrian Anderson-1/+1
2014-07-09Register new snapshotsAlex Crichton-2/+0
Closes #15544
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-3/+3
[breaking-change]
2014-07-05Add #[crate_name] attributes as necessaryAlex Crichton-1/+3
2014-07-04auto merge of #15369 : omasanori/rust/asctime, r=alexcrichtonbors-5/+35
In C, `ctime(t)` is equivalent to `asctime(localtime(t))`, so the result should depend on the local timezone. Current `ctime` is compatible with `asctime` in C, not `ctime`. This commit renames `ctime` to `asctime` and adds `ctime` which converts the time to the local timezone before formatting it. This commit also fixes the documentation of them. Current documentation of `ctime` says it returns "a string of the current time." However, it actually returns a string of the time represented as `self`, not the time when it is called.
2014-07-04auto merge of #15343 : alexcrichton/rust/0.11.0-release, r=brsonbors-2/+2
2014-07-03Fix minor issues in the documentation of libtime.OGINO Masanori-2/+3
- When the timezone is UTC, the "zone" field of the RFC 822 format is "GMT" (or "UT"), not "UTC." - Although the name of `rfc3999` refers to RFC 3999, the documentation of it refers only to ISO 8601. This commit adds a description of the relation between ISO 8601 and RFC 3999. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-07-04Rename ctime to asctime and add *proper* ctime.OGINO Masanori-5/+35
In C, `ctime(t)` is equivalent to `asctime(localtime(t))`, so the result should depend on the local timezone. Current `ctime` is compatible with `asctime` in C, not `ctime`. This commit renames `ctime` to `asctime` and adds `ctime` which converts the time to the local timezone before formatting it. This commit also fixes the documentation of them. Current documentation of `ctime` says it returns "a string of the current time." However, it actually returns a string of the time represented as `self`, not the time when it is called. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-07-02Merge remote-tracking branch 'origin/master' into 0.11.0-releaseAlex Crichton-2/+2
Conflicts: src/libstd/lib.rs
2014-07-01rustc: Remove `&str` indexing from the language.Brian Anderson-1/+1
Being able to index into the bytes of a string encourages poor UTF-8 hygiene. To get a view of `&[u8]` from either a `String` or `&str` slice, use the `as_bytes()` method. Closes #12710. [breaking-change]
2014-06-28Rename all raw pointers as necessaryAlex Crichton-1/+1
2014-06-27Update to 0.11.0 0.11.0Alex Crichton-2/+2
2014-06-17Mark all crates except std as experimentalBrian Anderson-0/+1
2014-06-16auto merge of #14715 : vhbit/rust/ios-pr2, r=alexcrichtonbors-3/+6
2014-06-14Register new snapshotsAlex Crichton-3/+1
2014-06-12Basic iOS supportValerii Hiora-3/+6
2014-06-11rustc: Remove ~[T] from the languageAlex Crichton-1/+0
The following features have been removed * box [a, b, c] * ~[a, b, c] * box [a, ..N] * ~[a, ..N] * ~[T] (as a type) * deprecated_owned_vector lint All users of ~[T] should move to using Vec<T> instead.
2014-06-11sync: Move underneath libstdAlex Crichton-3/+1
This commit is the final step in the libstd facade, #13851. The purpose of this commit is to move libsync underneath the standard library, behind the facade. This will allow core primitives like channels, queues, and atomics to all live in the same location. There were a few notable changes and a few breaking changes as part of this movement: * The `Vec` and `String` types are reexported at the top level of libcollections * The `unreachable!()` macro was copied to libcore * The `std::rt::thread` module was moved to librustrt, but it is still reexported at the same location. * The `std::comm` module was moved to libsync * The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`. It is now a private module with types/functions being reexported under `sync::comm`. This is a breaking change for any existing users of duplex streams. * All concurrent queues/deques were moved directly under libsync. They are also all marked with #![experimental] for now if they are public. * The `task_pool` and `future` modules no longer live in libsync, but rather live under `std::sync`. They will forever live at this location, but they may move to libsync if the `std::task` module moves as well. [breaking-change]
2014-06-09Use phase(plugin) in bootstrap cratesKeegan McAllister-1/+3
Do this to avoid warnings on post-stage0 builds.
2014-06-06rustdoc: Submit examples to play.rust-lang.orgAlex Crichton-1/+2
This grows a new option inside of rustdoc to add the ability to submit examples to an external website. If the `--markdown-playground-url` command line option or crate doc attribute `html_playground_url` is present, then examples will have a button on hover to submit the code to the playground specified. This commit enables submission of example code to play.rust-lang.org. The code submitted is that which is tested by rustdoc, not necessarily the exact code shown in the example. Closes #14654
2014-06-06Change to_str().to_string() to just to_str()Adolfo Ochagavía-3/+3
2014-06-01std: Drop Total from Total{Eq,Ord}Alex Crichton-1/+1
This completes the last stage of the renaming of the comparison hierarchy of traits. This change renames TotalEq to Eq and TotalOrd to Ord. In the future the new Eq/Ord will be filled out with their appropriate methods, but for now this change is purely a renaming change. [breaking-change]
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-2/+2
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-28std: Remove format_strbuf!()Alex Crichton-32/+31
This was only ever a transitionary macro.
2014-05-27Move std::{reflect,repr,Poly} to a libdebug crateAlex Crichton-0/+2
This commit moves reflection (as well as the {:?} format modifier) to a new libdebug crate, all of which is marked experimental. This is a breaking change because it now requires the debug crate to be explicitly linked if the :? format qualifier is used. This means that any code using this feature will have to add `extern crate debug;` to the top of the crate. Any code relying on reflection will also need to do this. Closes #12019 [breaking-change]
2014-05-27std: Rename strbuf operations to stringRicho Healey-209/+209
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-13/+13
[breaking-change]
2014-05-22auto merge of #14348 : alexcrichton/rust/doc.rust-lang.org, r=huonwbors-1/+1
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-7/+0
[breaking-change]
2014-05-22libtime: Remove the `tz_zone` field from times.Patrick Walton-35/+1
It depends on `~str`.
2014-05-21Change static.rust-lang.org to doc.rust-lang.orgAlex Crichton-1/+1
The new documentation site has shorter urls, gzip'd content, and index.html redirecting functionality.
2014-05-16auto merge of #14216 : kballard/rust/macos_precise_time_ns, r=alexcrichtonbors-4/+19
Use sync::one::Once to fetch the mach_timebase_info only once when running precise_time_ns(). This helps because mach_timebase_info() is surprisingly inefficient. Also fix the order of operations when applying the timebase to the mach absolute time value. This improves the time on my machine from ``` test tests::bench_precise_time_ns ... bench: 157 ns/iter (+/- 4) ``` to ``` test tests::bench_precise_time_ns ... bench: 38 ns/iter (+/- 3) ``` and it will get even faster once #14174 lands.
2014-05-16Optimize and fix time::precise_time_ns() on macosKevin Ballard-4/+19
Use sync::one::Once to fetch the mach_timebase_info only once when running precise_time_ns(). This helps because mach_timebase_info() is surprisingly inefficient. Also fix the order of operations when applying the timebase to the mach absolute time value. This improves the time on my machine from ``` test tests::bench_precise_time_ns ... bench: 157 ns/iter (+/- 4) ``` to ``` test tests::bench_precise_time_ns ... bench: 38 ns/iter (+/- 3) ``` and it will get even faster once #14174 lands.
2014-05-16auto merge of #14233 : pcwalton/rust/detildestr-morelibs, r=alexcrichtonbors-1/+1
r? @alexcrichton
2014-05-16libserialize: Remove all uses of `~str` from `libserialize`.Patrick Walton-1/+1
Had to make `struct Tm` in `libtime` not serializable for now.
2014-05-16time: crate descriptionCorey Richardson-0/+3