Skip to content

Commit

Permalink
Fix a few typos in comments/docs/strings
Browse files Browse the repository at this point in the history
  • Loading branch information
eumiro committed Aug 17, 2023
1 parent 8af563b commit dbca9c3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/docs/limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Even though the `DateTime` class is a subclass of `datetime`,
there are some rare cases where it can't replace the native class directly.
Here is a list (non-exhaustive) of the reported cases with a possible solution, if any:

* `sqlite3` will use the the `type()` function to determine the type of the object by default. To work around it you can register a new adapter:
* `sqlite3` will use the `type()` function to determine the type of the object by default. To work around it you can register a new adapter:

```python
import pendulum
Expand All @@ -13,7 +13,7 @@ Here is a list (non-exhaustive) of the reported cases with a possible solution,
register_adapter(pendulum.DateTime, lambda val: val.isoformat(' '))
```

* `mysqlclient` (former `MySQLdb`) and `PyMySQL` will use the the `type()` function to determine the type of the object by default. To work around it you can register a new adapter:
* `mysqlclient` (former `MySQLdb`) and `PyMySQL` will use the `type()` function to determine the type of the object by default. To work around it you can register a new adapter:

```python
import pendulum
Expand Down
2 changes: 1 addition & 1 deletion pendulum/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def today(tz: str | Timezone = "local") -> DateTime:

def tomorrow(tz: str | Timezone = "local") -> DateTime:
"""
Create a DateTime instance for tommorow.
Create a DateTime instance for tomorrow.
"""
return today(tz).add(days=1)

Expand Down
2 changes: 1 addition & 1 deletion pendulum/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def nth_of(self, unit: str, nth: int, day_of_week: WeekDay) -> Self:
dt = cast("Self", getattr(self, f"_nth_of_{unit}")(nth, day_of_week))
if not dt:
raise PendulumException(
f"Unable to find occurence {nth}"
f"Unable to find occurrence {nth}"
f" of {WeekDay(day_of_week).name.capitalize()} in {unit}"
)

Expand Down
4 changes: 2 additions & 2 deletions pendulum/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ def __repr__(self) -> str:
# Comparisons
def closest(self, *dts: datetime.datetime) -> Self: # type: ignore[override]
"""
Get the farthest date from the instance.
Get the closest date to the instance.
"""
pdts = [self.instance(x) for x in dts]

Expand Down Expand Up @@ -1013,7 +1013,7 @@ def nth_of(self, unit: str, nth: int, day_of_week: WeekDay) -> Self:
dt = cast(Optional["Self"], getattr(self, f"_nth_of_{unit}")(nth, day_of_week))
if not dt:
raise PendulumException(
f"Unable to find occurence {nth}"
f"Unable to find occurrence {nth}"
f" of {WeekDay(day_of_week).name.capitalize()} in {unit}"
)

Expand Down

0 comments on commit dbca9c3

Please sign in to comment.