1
0
mirror of https://github.com/bspeice/dtparse synced 2025-07-06 00:06:29 -04:00

Add old rust versions to test agains

This commit is contained in:
Bradlee Speice
2018-08-10 22:15:27 -04:00
parent 48705339e6
commit 4d48885f4b
4 changed files with 32 additions and 9 deletions

View File

@ -10,7 +10,7 @@
//! sense of the dates and times they contain. A couple of quick examples
//! from the test cases should give some context:
//!
//! ```rust
//! ```rust,ignore (tests-dont-compile-on-old-rust)
//! # extern crate chrono;
//! # extern crate dtparse;
//! use chrono::prelude::*;
@ -34,7 +34,7 @@
//! And we can even handle fuzzy strings where dates/times aren't the
//! only content if we dig into the implementation a bit!
//!
//! ```rust
//! ```rust,ignore (tests-dont-compile-on-old-rust)
//! # extern crate chrono;
//! # extern crate dtparse;
//! use chrono::prelude::*;

View File

@ -16,13 +16,13 @@ impl DayOfWeek {
pub fn to_numeral(&self) -> u32 {
match self {
DayOfWeek::Sunday => 0,
DayOfWeek::Monday => 1,
DayOfWeek::Tuesday => 2,
DayOfWeek::Wednesday => 3,
DayOfWeek::Thursday => 4,
DayOfWeek::Friday => 5,
DayOfWeek::Saturday => 6,
&DayOfWeek::Sunday => 0,
&DayOfWeek::Monday => 1,
&DayOfWeek::Tuesday => 2,
&DayOfWeek::Wednesday => 3,
&DayOfWeek::Thursday => 4,
&DayOfWeek::Friday => 5,
&DayOfWeek::Saturday => 6,
}
}