Skip to content

Commit

Permalink
Fix typos (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng authored Dec 23, 2021
1 parent 628d9db commit 22230a0
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/datetime/ambiguous.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Timex.AmbiguousDateTime do
to -5 from UTC. Since there is no timezone period associated with the hours
of 2-3 AM in the America/Chicago zone (it's neither CST nor CDT during that hour),
one has to decide what the intent is. Timex makes the call that shifting to the
next period (i.e. "spring foward" using our example above) makes the most logical
next period (i.e. "spring forward" using our example above) makes the most logical
sense when working with non-existent time periods.
TL;DR - Timex will "spring forward" or "fall back", depending on what the zone change
Expand All @@ -26,7 +26,7 @@ defmodule Timex.AmbiguousDateTime do
This one is the reason why this module exists. There are times, though rare, where more
than one zone applies to a given date and time. For example, Asia/Taipei, on December 31st,
1895, from 23:54:00 to 23:59:59, two timezone periods are active LMT, and JWST, because that
locale was switching to JWST from LMT. Because of this, it's impossible to know programmaticaly
locale was switching to JWST from LMT. Because of this, it's impossible to know programmatically
which zone is desired. The programmer must make a choice on which zone they want to use.
For this use case, Timex will return an AmbiguousDateTime any time you try to create a DateTime,
Expand Down
2 changes: 1 addition & 1 deletion lib/datetime/datetime.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defimpl Timex.Protocol, for: DateTime do
A type which represents a date and time with timezone information (optional, UTC will
be assumed for date/times with no timezone information provided).
Functions that produce time intervals use UNIX epoch (or simly Epoch) as the
Functions that produce time intervals use UNIX epoch (or simply Epoch) as the
default reference date. Epoch is defined as UTC midnight of January 1, 1970.
Time intervals in this module don't account for leap seconds.
Expand Down
2 changes: 1 addition & 1 deletion lib/parse/zoneinfo/parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Timex.Parse.ZoneInfo.Parser do
# See https://tools.ietf.org/id/draft-murchison-tzdist-tzif-00.html for details
defmodule Zone do
@moduledoc """
Represents the data retreived from a binary tzfile.
Represents the data retrieved from a binary tzfile.
"""
# Maximum version encountered
defstruct version: nil,
Expand Down
2 changes: 1 addition & 1 deletion lib/timex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ defmodule Timex do

@doc """
Return a boolean indicating whether the given year is a leap year. You may
pase a date or a year number.
pass a date or a year number.
## Examples
Expand Down
2 changes: 1 addition & 1 deletion lib/timezone/local.ex
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ defmodule Timex.Timezone.Local do

@doc """
Given a binary representing the data from a tzfile (not the source version),
parses out the timezone for the curent date/time in UTC.
parses out the timezone for the current date/time in UTC.
"""
@spec parse_tzfile(binary) :: {:ok, String.t()} | {:error, term}
def parse_tzfile(tzdata) do
Expand Down
2 changes: 1 addition & 1 deletion lib/timezone/posix_timezone.ex
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ defmodule Timex.PosixTimezone do

date =
if ldom > day do
# Last occurrance is in week 4, so shift back a week
# Last occurrence is in week 4, so shift back a week
%{first_week_date | day: day - 7}
else
%{first_week_date | day: day}
Expand Down
2 changes: 1 addition & 1 deletion test/conversion_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ defmodule ConversionTests do
assert datetime == @default_utc_datetime
end

test "map with unparseable string int value" do
test "map with unparsable string int value" do
datetime =
@default_map
|> Map.put("minute", "")
Expand Down
2 changes: 1 addition & 1 deletion test/timex_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ defmodule TimexTests do
Timex.diff(~T[12:00:00], ~T[12:00:00], :dayz)
end

test "month diff is asymetrical for months of different lengths" do
test "month diff is asymmetrical for months of different lengths" do
assert Timex.diff(~D[2017-02-28], ~D[2017-01-27], :months) === 1
assert Timex.diff(~D[2017-02-28], ~D[2017-01-28], :months) === 1
assert Timex.diff(~D[2017-02-28], ~D[2017-01-29], :months) === 0
Expand Down

0 comments on commit 22230a0

Please sign in to comment.