Home
last modified time | relevance | path

Searched refs:set_year (Results 1 – 2 of 2) sorted by relevance

/external/rust/crates/chrono/src/format/
Dparsed.rs165 pub fn set_year(&mut self, value: i64) -> ParseResult<()> { in set_year() method
626 parsed.set_year(i64::from(datetime.year()))?; in to_naive_datetime_with_offset()
733 assert_eq!(p.set_year(1987), Ok(())); in test_parsed_set_fields()
734 assert_eq!(p.set_year(1986), Err(IMPOSSIBLE)); in test_parsed_set_fields()
735 assert_eq!(p.set_year(1988), Err(IMPOSSIBLE)); in test_parsed_set_fields()
736 assert_eq!(p.set_year(1987), Ok(())); in test_parsed_set_fields()
745 assert_eq!(p.set_year(0), Ok(())); in test_parsed_set_fields()
752 assert_eq!(p.set_year(-1), Ok(())); in test_parsed_set_fields()
753 assert_eq!(p.set_year(-2), Err(IMPOSSIBLE)); in test_parsed_set_fields()
754 assert_eq!(p.set_year(0), Err(IMPOSSIBLE)); in test_parsed_set_fields()
Dparse.rs131 parsed.set_year(year)?; in parse_rfc2822()
187 parsed.set_year(try_consume!(scan::number(s, 4, 4)))?; in parse_rfc3339()
300 Year => (4, true, Parsed::set_year), in parse_internal()