Skip to content

Commit f0aeb71

Browse files
fertapricJosé Valim
authored andcommitted
Use "time zone" instead of "timezone" everywhere (#7917)
There is a mix of "timezone" and "time zone" in the codebase. For what I read, "time zone" is usually more correct. In addition, there are some variables and types named `time_zone`, so I think the best option is to go with "time zone". Signed-off-by: José Valim <[email protected]>
1 parent d92a450 commit f0aeb71

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

lib/elixir/lib/calendar/datetime.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ defmodule DateTime do
1717
Such functions expect `t:Calendar.datetime/0` in their typespecs
1818
(instead of `t:t/0`).
1919
20-
Developers should avoid creating the DateTime struct directly
20+
Developers should avoid creating the `DateTime` struct directly
2121
and instead rely on the functions provided by this module as
2222
well as the ones in 3rd party calendar libraries.
2323
2424
## Where are my functions?
2525
2626
You will notice this module only contains conversion
2727
functions as well as functions that work on UTC. This
28-
is because a proper DateTime implementation requires a
29-
TimeZone database which currently is not provided as part
28+
is because a proper `DateTime` implementation requires a
29+
time zone database which currently is not provided as part
3030
of Elixir.
3131
3232
Such may be addressed in upcoming versions, meanwhile,
33-
use 3rd party packages to provide DateTime building and
33+
use 3rd party packages to provide `DateTime` building and
3434
similar functionality with time zone backing.
3535
"""
3636

lib/elixir/lib/calendar/naive_datetime.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ defmodule NaiveDateTime do
412412
Parses the extended "Date and time of day" format described by
413413
[ISO 8601:2004](https://en.wikipedia.org/wiki/ISO_8601).
414414
415-
Timezone offset may be included in the string but they will be
415+
Time zone offset may be included in the string but they will be
416416
simply discarded as such information is not included in naive date
417417
times.
418418

lib/elixir/lib/calendar/time.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ defmodule Time do
177177
Parses the extended "Local time" format described by
178178
[ISO 8601:2004](https://en.wikipedia.org/wiki/ISO_8601).
179179
180-
Timezone offset may be included in the string but they will be
180+
Time zone offset may be included in the string but they will be
181181
simply discarded as such information is not included in times.
182182
183183
As specified in the standard, the separator "T" may be omitted if

lib/elixir/lib/kernel.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ defmodule Kernel do
7070
listed above. Some of them are:
7171
7272
* `Date` - `year-month-day` structs in a given calendar
73-
* `DateTime` - date and time with timezone in a given calendar
73+
* `DateTime` - date and time with time zone in a given calendar
7474
* `Exception` - data raised from errors and unexpected scenarios
7575
* `MapSet` - unordered collections of unique elements
76-
* `NaiveDateTime` - date and time without timezone in a given calendar
76+
* `NaiveDateTime` - date and time without time zone in a given calendar
7777
* `Keyword` - lists of two-element tuples, often representing optional values
7878
* `Range` - inclusive ranges between two integers
7979
* `Regex` - regular expressions

lib/iex/lib/iex/info.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ defimpl IEx.Info, for: [Date, Time, NaiveDateTime] do
338338
case @for do
339339
Date -> {"D", "date"}
340340
Time -> {"T", "time"}
341-
NaiveDateTime -> {"N", ~S{"naive" datetime (that is, a datetime without a timezone)}}
341+
NaiveDateTime -> {"N", ~S{"naive" datetime (that is, a datetime without a time zone)}}
342342
end
343343

344344
def info(value) do

lib/iex/test/iex/info_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ defmodule IEx.InfoTest do
194194
assert get_key(info, "Reference modules") == "NaiveDateTime, Calendar, Map"
195195

196196
assert get_key(info, "Description") =~
197-
~S{a "naive" datetime (that is, a datetime without a timezone)}
197+
~S{a "naive" datetime (that is, a datetime without a time zone)}
198198

199199
assert get_key(info, "Description") =~ "`~N`"
200200
end

0 commit comments

Comments
 (0)