Home
last modified time | relevance | path

Searched refs:NaiveDate (Results 1 – 17 of 17) sorted by relevance

/external/rust/crates/chrono/src/naive/
Ddate.rs99 pub struct NaiveDate { struct
104 pub const MIN_DATE: NaiveDate = NaiveDate { ymdf: (MIN_YEAR << 13) | (1 << 4) | 0o07 /*FE*/ };
106 pub const MAX_DATE: NaiveDate = NaiveDate { ymdf: (MAX_YEAR << 13) | (365 << 4) | 0o17 /*F*/ };
112 let calculated_min = NaiveDate::from_ymd(MIN_YEAR, 1, 1); in test_date_bounds()
113 let calculated_max = NaiveDate::from_ymd(MAX_YEAR, 12, 31); in test_date_bounds()
136 impl NaiveDate { implementation
138 fn from_of(year: i32, of: Of) -> Option<NaiveDate> { in from_of() argument
141 Some(NaiveDate { ymdf: (year << 13) | (of as DateImpl) }) in from_of()
148 fn from_mdf(year: i32, mdf: Mdf) -> Option<NaiveDate> { in from_mdf() argument
149 NaiveDate::from_of(year, mdf.to_of()) in from_mdf()
[all …]
Ddatetime.rs20 use naive::{IsoWeek, NaiveDate, NaiveTime};
63 date: NaiveDate,
85 pub fn new(date: NaiveDate, time: NaiveTime) -> NaiveDateTime { in new() argument
151 .and_then(NaiveDate::from_num_days_from_ce_opt); in from_timestamp_opt()
237 pub fn date(&self) -> NaiveDate { in date() argument
1509 to_string(&NaiveDate::from_ymd(2016, 7, 8).and_hms_milli(9, 10, 48, 90)).ok(), in test_encodable_json()
1513 to_string(&NaiveDate::from_ymd(2014, 7, 24).and_hms(12, 34, 6)).ok(), in test_encodable_json()
1517 to_string(&NaiveDate::from_ymd(0, 1, 1).and_hms_milli(0, 0, 59, 1_000)).ok(), in test_encodable_json()
1521 to_string(&NaiveDate::from_ymd(-1, 12, 31).and_hms_nano(23, 59, 59, 7)).ok(), in test_encodable_json()
1544 Some(NaiveDate::from_ymd(2016, 7, 8).and_hms_milli(9, 10, 48, 90)) in test_decodable_json()
[all …]
/external/rust/crates/rusqlite/src/types/
Dchrono.rs5 use chrono::{DateTime, Local, NaiveDate, NaiveDateTime, NaiveTime, TimeZone, Utc};
11 impl ToSql for NaiveDate { implementation
19 impl FromSql for NaiveDate { implementation
23 .and_then(|s| match NaiveDate::parse_from_str(s, "%Y-%m-%d") { in column_result()
132 use chrono::{DateTime, Duration, Local, NaiveDate, NaiveDateTime, NaiveTime, TimeZone, Utc};
144 let date = NaiveDate::from_ymd(2016, 2, 23); in test_naive_date()
152 let t: NaiveDate = db in test_naive_date()
178 let date = NaiveDate::from_ymd(2016, 2, 23); in test_naive_date_time()
205 let date = NaiveDate::from_ymd(2016, 2, 23); in test_date_time_utc()
244 let date = NaiveDate::from_ymd(2016, 2, 23); in test_date_time_local()
[all …]
/external/rust/crates/chrono/src/offset/
Dlocal.rs13 use naive::{NaiveDate, NaiveDateTime};
28 fn tm_to_naive_date(tm: &sys::Tm) -> NaiveDate { in tm_to_datetime() argument
30 NaiveDate::from_yo(tm.tm_year + 1900, tm.tm_yday as u32 + 1) in tm_to_datetime()
34 fn tm_to_naive_date(tm: &sys::Tm) -> NaiveDate { in tm_to_datetime() argument
36 NaiveDate::from_ymd(tm.tm_year + 1900, tm.tm_mon as u32 + 1, tm.tm_mday as u32) in tm_to_datetime()
125 fn offset_from_local_date(&self, local: &NaiveDate) -> LocalResult<FixedOffset> { in offset_from_local_date()
133 fn offset_from_utc_date(&self, utc: &NaiveDate) -> FixedOffset { in offset_from_utc_date()
142 fn from_local_date(&self, local: &NaiveDate) -> LocalResult<Date<Local>> { in from_local_date()
171 fn from_utc_date(&self, utc: &NaiveDate) -> Date<Local> { in from_utc_date()
Dmod.rs24 use naive::{NaiveDate, NaiveDateTime, NaiveTime};
234 match NaiveDate::from_ymd_opt(year, month, day) { in ymd_opt()
267 match NaiveDate::from_yo_opt(year, ordinal) { in yo_opt()
304 match NaiveDate::from_isoywd_opt(year, week, weekday) { in isoywd_opt()
426 fn offset_from_local_date(&self, local: &NaiveDate) -> LocalResult<Self::Offset>; in offset_from_local_date()
432 fn from_local_date(&self, local: &NaiveDate) -> LocalResult<Date<Self>> { in from_local_date()
446 fn offset_from_utc_date(&self, utc: &NaiveDate) -> Self::Offset; in offset_from_utc_date()
453 fn from_utc_date(&self, utc: &NaiveDate) -> Date<Self> { in from_utc_date()
Dutc.rs9 use naive::{NaiveDate, NaiveDateTime};
69 fn offset_from_local_date(&self, _local: &NaiveDate) -> LocalResult<Utc> { in offset_from_local_date()
76 fn offset_from_utc_date(&self, _utc: &NaiveDate) -> Utc { in offset_from_utc_date()
Dfixed.rs12 use naive::{NaiveDate, NaiveDateTime, NaiveTime};
108 fn offset_from_local_date(&self, _local: &NaiveDate) -> LocalResult<FixedOffset> { in offset_from_local_date()
115 fn offset_from_utc_date(&self, _utc: &NaiveDate) -> FixedOffset { in offset_from_utc_date()
/external/rust/crates/chrono/src/
Dlib.rs497 pub use naive::{IsoWeek, NaiveDate, NaiveDateTime, NaiveTime};
524 pub use {NaiveDate, NaiveDateTime, NaiveTime};
554 pub use self::date::{NaiveDate, MAX_DATE, MIN_DATE};
1434 let d4 = NaiveDate::from_ymd(y, 4, 4); in test_readme_doomsday()
1435 let d6 = NaiveDate::from_ymd(y, 6, 6); in test_readme_doomsday()
1436 let d8 = NaiveDate::from_ymd(y, 8, 8); in test_readme_doomsday()
1437 let d10 = NaiveDate::from_ymd(y, 10, 10); in test_readme_doomsday()
1438 let d12 = NaiveDate::from_ymd(y, 12, 12); in test_readme_doomsday()
1441 let d59 = NaiveDate::from_ymd(y, 5, 9); in test_readme_doomsday()
1442 let d95 = NaiveDate::from_ymd(y, 9, 5); in test_readme_doomsday()
[all …]
Ddate.rs17 use naive::{self, IsoWeek, NaiveDate, NaiveTime};
48 date: NaiveDate,
63 pub fn from_utc(date: NaiveDate, offset: Tz::Offset) -> Date<Tz> { in from_utc() argument
254 pub fn naive_utc(&self) -> NaiveDate { in naive_utc() argument
264 pub fn naive_local(&self) -> NaiveDate { in naive_local() argument
272 F: FnMut(NaiveDate) -> Option<NaiveDate>, in map_local() argument
Ddatetime.rs2173 use naive::{NaiveDate, NaiveTime};
2250 assert_eq!(d.date().naive_local(), NaiveDate::from_ymd(2014, 5, 6)); in test_datetime_date_and_time()
2257 assert_eq!(d.date().naive_local(), NaiveDate::from_ymd(2016, 5, 4)); in test_datetime_date_and_time()
2264 assert_eq!(d.date().naive_local(), NaiveDate::from_ymd(2017, 8, 9)); in test_datetime_date_and_time()
/external/rust/crates/chrono/src/format/
Dmod.rs32 use naive::{NaiveDate, NaiveTime};
393 date: Option<&NaiveDate>, in format_item() argument
406 date: Option<&NaiveDate>, in format_inner() argument
461 let week_from_sun = |d: &NaiveDate| { in format_inner()
464 let week_from_mon = |d: &NaiveDate| { in format_inner()
691 date: Option<&NaiveDate>, in format() argument
721 date: Option<NaiveDate>,
735 pub fn new(date: Option<NaiveDate>, time: Option<NaiveTime>, items: I) -> DelayedFormat<I> { in new() argument
741 date: Option<NaiveDate>, in new_with_offset() argument
762 date: Option<NaiveDate>, in new_with_locale() argument
[all …]
Dparsed.rs12 use naive::{NaiveDate, NaiveDateTime, NaiveTime};
321 pub fn to_naive_date(&self) -> ParseResult<NaiveDate> { in to_naive_date() argument
372 let verify_ymd = |date: NaiveDate| { in to_naive_date()
390 let verify_isoweekdate = |date: NaiveDate| { in to_naive_date()
409 let verify_ordinal = |date: NaiveDate| { in to_naive_date()
425 let date = NaiveDate::from_ymd_opt(year, month, day).ok_or(OUT_OF_RANGE)?; in to_naive_date()
431 let date = NaiveDate::from_yo_opt(year, ordinal).ok_or(OUT_OF_RANGE)?; in to_naive_date()
441 let newyear = NaiveDate::from_yo_opt(year, 1).ok_or(OUT_OF_RANGE)?; in to_naive_date()
475 let newyear = NaiveDate::from_yo_opt(year, 1).ok_or(OUT_OF_RANGE)?; in to_naive_date()
505 let date = NaiveDate::from_isoywd_opt(isoyear, isoweek, weekday); in to_naive_date()
[all …]
/external/rust/crates/plotters/src/coord/ranged1d/types/
Ddatetime.rs2 use chrono::{Date, DateTime, Datelike, Duration, NaiveDate, NaiveDateTime, TimeZone, Timelike};
51 impl TimeValue for NaiveDate { implementation
52 type DateType = NaiveDate;
53 fn date_floor(&self) -> NaiveDate { in date_floor() argument
56 fn date_ceil(&self) -> NaiveDate { in date_ceil() argument
59 fn earliest_after_date(date: NaiveDate) -> Self { in earliest_after_date()
62 fn subtract(&self, other: &NaiveDate) -> Duration { in subtract()
67 NaiveDate::from_ymd(year, month, date) in ymd()
129 type DateType = NaiveDate;
130 fn date_floor(&self) -> NaiveDate { in date_floor() argument
[all …]
/external/rust/crates/chrono/benches/
Dchrono.rs95 let d = NaiveDate::from_ymd(*year, 1, 1); in bench_num_days_from_ce()
/external/rust/crates/chrono/
DCHANGELOG.md52 * Add day and week iterators for `NaiveDate` (@gnzlbg & @robyoung)
198 * Added `NaiveDate::from_weekday_of_month{,_opt}` for getting eg. the 2nd Friday of March 2017.
272 `NaiveDate`, `NaiveTime` and `NaiveDateTime`. (#99)
294 `chrono::naive::date::NaiveDate` | `chrono::naive::NaiveDate`
416 - `checked_*` → `checked_*_signed` in `Date`, `DateTime`, `NaiveDate` and `NaiveDateTime` types
672 `NaiveTime` and `NaiveDate` can be freely combined and splitted,
DREADME.md379 as [**`NaiveDate`**](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html),
/external/rust/crates/plotters/
DRELEASE-NOTES.md75 * `chrono::NaiveDate` and `chrono::NaiveDateTime` are now supported