Skip to content

Commit

Permalink
Fix typos in documentation (#3832)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuhave committed Jun 13, 2024
1 parent 2b022df commit 0a8b54f
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const daysInWeek = 7;
*
* One years equals 365.2425 days according to the formula:
*
* > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.
* > Leap year occurs every 4 years, except for years that are dividable by 100 and not dividable by 400.
* > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days
*/
export const daysInYear = 365.2425;
Expand Down
2 changes: 1 addition & 1 deletion src/constructFrom/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import type { GenericDateConstructor } from "../types.js";
* // A function that clones a date preserving the original type
* function cloneDate<DateType extends Date>(date: DateType): DateType {
* return constructFrom(
* date, // Use contrustor from the given date
* date, // Use constructor from the given date
* date.getTime() // Use the date value to create a new date
* );
* }
Expand Down
2 changes: 1 addition & 1 deletion src/differenceInBusinessDays/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { toDate } from "../toDate/index.js";
*
* @description
* Get the number of business day periods between the given dates.
* Business days being days that arent in the weekend.
* Business days being days that aren't in the weekend.
* Like `differenceInCalendarDays`, the function removes the times from
* the dates before calculating the difference.
*
Expand Down
2 changes: 1 addition & 1 deletion src/formatISO/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface FormatISOOptions extends ISOFormatOptions {}
* @param date - The original date
* @param options - An object with options.
*
* @returns The formatted date string (in loca.l time zone)
* @returns The formatted date string (in local time zone)
*
* @throws `date` must not be Invalid Date
*
Expand Down
2 changes: 1 addition & 1 deletion src/isMatch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export interface IsMatchOptions
* 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.
* 7. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based
Expand Down
2 changes: 1 addition & 1 deletion src/isValid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { toDate } from "../toDate/index.js";
* //=> true
*
* @example
* // For the value, convertable into a date:
* // For the value, convertible into a date:
* const result = isValid(1393804800000)
* //=> true
*
Expand Down
2 changes: 1 addition & 1 deletion src/milliseconds/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { Duration } from "../types.js";
*
* One years equals 365.2425 days according to the formula:
*
* > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.
* > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.
* > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days
*
* One month is a year divided by 12.
Expand Down
2 changes: 1 addition & 1 deletion src/millisecondsToSeconds/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { millisecondsInSecond } from "../constants/index.js";
* @returns The number of milliseconds converted in seconds
*
* @example
* // Convert 1000 miliseconds to seconds:
* // Convert 1000 milliseconds to seconds:
* const result = millisecondsToSeconds(1000)
* //=> 1
*
Expand Down
2 changes: 1 addition & 1 deletion src/parse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
* 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.
* 7. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based
Expand Down
6 changes: 3 additions & 3 deletions src/subBusinessDays/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { addBusinessDays } from "../addBusinessDays/index.js";
/**
* @name subBusinessDays
* @category Day Helpers
* @summary Substract the specified number of business days (mon - fri) to the given date.
* @summary Subtract the specified number of business days (mon - fri) to the given date.
*
* @description
* Substract the specified number of business days (mon - fri) to the given date, ignoring weekends.
* Subtract the specified number of business days (mon - fri) to the given date, ignoring weekends.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
Expand All @@ -16,7 +16,7 @@ import { addBusinessDays } from "../addBusinessDays/index.js";
* @returns The new date with the business days subtracted
*
* @example
* // Substract 10 business days from 1 September 2014:
* // Subtract 10 business days from 1 September 2014:
* const result = subBusinessDays(new Date(2014, 8, 1), 10)
* //=> Mon Aug 18 2014 00:00:00 (skipped weekend days)
*/
Expand Down

0 comments on commit 0a8b54f

Please sign in to comment.