Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor authored and djc committed Oct 20, 2024
1 parent 771c047 commit 77d50b1
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ release notes on [GitHub](https://github.com/chronotope/chrono/releases).

### Fixes

* Make Datetime arithmatic adjust their offsets after discovering their new
* Make Datetime arithmetic adjust their offsets after discovering their new
timestamps (@quodlibetor #337)
* Put wasm-bindgen related code and dependencies behind a `wasmbind` feature
gate. (@quodlibetor #335)
Expand Down Expand Up @@ -599,7 +599,7 @@ and replaced by 0.2.25 very shortly. Duh.)

### Added

- `Offset` is splitted into `TimeZone` (constructor) and `Offset` (storage) types.
- `Offset` is split into `TimeZone` (constructor) and `Offset` (storage) types.
You would normally see only the former, as the latter is mostly an implementation detail.
Most importantly, `Local` now can be used to directly construct timezone-aware values.

Expand Down Expand Up @@ -661,7 +661,7 @@ and replaced by 0.2.25 very shortly. Duh.)
so we simply let it go.

In the case that `Time` is really required, one can use a simpler `NaiveTime`.
`NaiveTime` and `NaiveDate` can be freely combined and splitted,
`NaiveTime` and `NaiveDate` can be freely combined and split,
and `TimeZone::from_{local,utc}_datetime` can be used to convert from/to the local time.

- `with_offset` method has been removed. Use `with_timezone` method instead.
Expand Down
2 changes: 1 addition & 1 deletion src/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ pub enum ParseErrorKind {
/// All formatting items have been read but there is a remaining input.
TooLong,

/// There was an error on the formatting string, or there were non-supported formating items.
/// There was an error on the formatting string, or there were non-supported formatting items.
BadFormat,

// TODO: Change this to `#[non_exhaustive]` (on the enum) with the next breaking release.
Expand Down
2 changes: 1 addition & 1 deletion src/format/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ where
}

/// Accepts a relaxed form of RFC3339.
/// A space or a 'T' are acepted as the separator between the date and time
/// A space or a 'T' are accepted as the separator between the date and time
/// parts. Additional spaces are allowed between each component.
///
/// All of these examples are equivalent:
Expand Down
2 changes: 1 addition & 1 deletion src/format/parsed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ impl Parsed {
///
/// # Errors
///
/// Returns `OUT_OF_RANGE` if `value` is ouside the range of an `i32`.
/// Returns `OUT_OF_RANGE` if `value` is outside the range of an `i32`.
///
/// Returns `IMPOSSIBLE` if this field was already set to a different value.
#[inline]
Expand Down
4 changes: 2 additions & 2 deletions src/offset/local/tz_info/rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,11 +589,11 @@ impl RuleDay {

let week_day_of_first_month_day =
(4 + days_since_unix_epoch(year, month, 1)).rem_euclid(DAYS_PER_WEEK);
let first_week_day_occurence_in_month =
let first_week_day_occurrence_in_month =
1 + (week_day as i64 - week_day_of_first_month_day).rem_euclid(DAYS_PER_WEEK);

let mut month_day =
first_week_day_occurence_in_month + (week as i64 - 1) * DAYS_PER_WEEK;
first_week_day_occurrence_in_month + (week as i64 - 1) * DAYS_PER_WEEK;
if month_day > day_in_month {
month_day -= DAYS_PER_WEEK
}
Expand Down
2 changes: 1 addition & 1 deletion src/offset/local/tz_info/timezone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ impl<'a> TimeZoneRef<'a> {

match transition_start.cmp(&transition_end) {
Ordering::Greater => {
// bakwards transition, eg from DST to regular
// backwards transition, eg from DST to regular
// this means a given local time could have one of two possible offsets
if local_leap_time < transition_end {
return Ok(crate::MappedLocalTime::Single(prev));
Expand Down
4 changes: 2 additions & 2 deletions tests/dateutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ fn verify_against_date_command_format_local(path: &'static str, dt: NaiveDateTim
let ldt = Local
.from_local_datetime(&date.and_hms_opt(dt.hour(), dt.minute(), dt.second()).unwrap())
.unwrap();
let formated_date = format!("{}\n", ldt.format(required_format));
assert_eq!(date_command_str, formated_date);
let formatted_date = format!("{}\n", ldt.format(required_format));
assert_eq!(date_command_str, formatted_date);
}

#[test]
Expand Down

0 comments on commit 77d50b1

Please sign in to comment.