Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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