Skip to content

Commit f1952cd

Browse files
authored
Fix a few typos in comments/docs/strings (#737)
1 parent 8af563b commit f1952cd

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

docs/docs/limitations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Even though the `DateTime` class is a subclass of `datetime`,
44
there are some rare cases where it can't replace the native class directly.
55
Here is a list (non-exhaustive) of the reported cases with a possible solution, if any:
66

7-
* `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:
7+
* `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:
88

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

16-
* `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:
16+
* `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:
1717

1818
```python
1919
import pendulum

pendulum/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def today(tz: str | Timezone = "local") -> DateTime:
261261

262262
def tomorrow(tz: str | Timezone = "local") -> DateTime:
263263
"""
264-
Create a DateTime instance for tommorow.
264+
Create a DateTime instance for tomorrow.
265265
"""
266266
return today(tz).add(days=1)
267267

pendulum/date.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def nth_of(self, unit: str, nth: int, day_of_week: WeekDay) -> Self:
560560
dt = cast("Self", getattr(self, f"_nth_of_{unit}")(nth, day_of_week))
561561
if not dt:
562562
raise PendulumException(
563-
f"Unable to find occurence {nth}"
563+
f"Unable to find occurrence {nth}"
564564
f" of {WeekDay(day_of_week).name.capitalize()} in {unit}"
565565
)
566566

pendulum/datetime.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ def __repr__(self) -> str:
496496
# Comparisons
497497
def closest(self, *dts: datetime.datetime) -> Self: # type: ignore[override]
498498
"""
499-
Get the farthest date from the instance.
499+
Get the closest date to the instance.
500500
"""
501501
pdts = [self.instance(x) for x in dts]
502502

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

0 commit comments

Comments
 (0)