Skip to content

Commit

Permalink
Merge pull request #50 from Munksgaard/typos
Browse files Browse the repository at this point in the history
Various documentation typo fixes
  • Loading branch information
kipcole9 authored Jul 8, 2024
2 parents 04259ae + 233013b commit 6fc4fa0
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 39 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ A `backend` module is required that is used to host the functions that manage CL

`ex_cldr_dates_times` is an addon library application for [ex_cldr](https://hex.pm/packages/ex_cldr) that provides localisation and formatting for dates, times and date_times.

The primary api is `MyApp.Cldr.Date.to_string/2`, `MyApp.Cldr.Time.to_string/2`, `MyApp.Cldr.DateTime.to_string/2` and `MyApp.Cldr.DateTime.Relative.to_string/2`. In the following examples `MyApp` refers to a CLDR backend module that must be defined by the developer:
The primary API is `MyApp.Cldr.Date.to_string/2`, `MyApp.Cldr.Time.to_string/2`, `MyApp.Cldr.DateTime.to_string/2` and `MyApp.Cldr.DateTime.Relative.to_string/2`. In the following examples `MyApp` refers to a CLDR backend module that must be defined by the developer:

```elixir
iex> MyApp.Cldr.Date.to_string ~D[2020-05-30]
Expand Down Expand Up @@ -103,7 +103,7 @@ Dates, Times and DateTimes can be formatted using standard formats, format strin
{:ok, "30 mai 2020 à 03:52:56 UTC"}
```

* Format strings use one or more formatting symbols to define what date and time elements should be places in the format. A simple example to format the time into hours and minutes:
* Format strings use one or more formatting symbols to define what date and time elements should be placed in the format. A simple example to format the time into hours and minutes:

```elixir
iex> MyApp.Cldr.DateTime.to_string ~U[2020-05-30 03:52:56Z], format: "hh:mm"
Expand Down Expand Up @@ -148,7 +148,7 @@ Dates, Times and DateTimes can be formatted using standard formats, format strin

The [CLDR standard](http://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table)
defines a wide range of format symbols. Most - but not all - of these symbols are supported in
`Cldr`. The supported symbols are described below. Note the [known restrictions and limitations](#known-restrictions-and-limitations).
`Cldr`. The supported symbols are described below. Note the [known restrictions and limitations](#known-restrictions-and-limitations).

| Element | Symbol | Example | Cldr Format |
| :-------------------- | :-------- | :-------------- | :--------------------------------- |
Expand Down
12 changes: 6 additions & 6 deletions lib/cldr/backend/date_time.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ defmodule Cldr.DateAndTime.Backend do
* `:format` is one of `:short`, `:medium`, `:long`, `:full` or a format string or
any of the keys in the map returned by `Cldr.DateTime.date_time_formats/3`.
The default is `:medium`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `:date_format` is any one of `:short`, `:medium`, `:long`, `:full`. If defined,
this option is used to format the date part of the date time. This option is
Expand Down Expand Up @@ -112,7 +112,7 @@ defmodule Cldr.DateAndTime.Backend do
* `:format` is one of `:short`, `:medium`, `:long`, `:full` or a format string or
any of the keys in the map returned by `Cldr.DateTime.date_time_formats/3`.
The default is `:medium`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `:date_format` is any one of `:short`, `:medium`, `:long`, `:full`. If defined,
this option is used to format the date part of the date time. This option is
Expand Down Expand Up @@ -195,7 +195,7 @@ defmodule Cldr.DateAndTime.Backend do
default for partial dates is to derive a candidate format id from the date and
find the best match from the formats returned by
`Cldr.Date.available_formats/3`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `:locale:` any locale returned by `Cldr.known_locale_names/1`.
The default is `Cldr.get_locale/0`.
Expand Down Expand Up @@ -280,7 +280,7 @@ defmodule Cldr.DateAndTime.Backend do
default for partial dates is to derive a candidate format id from the date and
find the best match from the formats returned by
`Cldr.Date.available_formats/3`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `:locale:` any locale returned by `Cldr.known_locale_names/1`.
The default is `Cldr.get_locale/0`.
Expand Down Expand Up @@ -366,7 +366,7 @@ defmodule Cldr.DateAndTime.Backend do
default for partial times is to derive a candidate format from the time and
find the best match from the formats returned by
`Cldr.Time.available_formats/2`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `:locale` any locale returned by `Cldr.known_locale_names/1`. The default is
`Cldr.get_locale/0`.
Expand Down Expand Up @@ -444,7 +444,7 @@ defmodule Cldr.DateAndTime.Backend do
default for partial times is to derive a candidate format from the time and
find the best match from the formats returned by
`Cldr.Time.available_formats/2`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `:locale` any locale returned by `Cldr.known_locale_names/1`. The default is
`Cldr.get_locale/0`.
Expand Down
8 changes: 4 additions & 4 deletions lib/cldr/backend/interval.ex
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ defmodule Cldr.Interval.Backend do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The valid
* `:style` supports different formatting styles. The valid
styles depends on whether formatting is for a date, time or datetime.
Since the functions in this module will make a determination as
to which formatter to be used based upon the data passed to them
Expand Down Expand Up @@ -166,7 +166,7 @@ defmodule Cldr.Interval.Backend do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The valid
* `:style` supports different formatting styles. The valid
styles depends on whether formatting is for a date, time or datetime.
Since the functions in this module will make a determination as
to which formatter to be used based upon the data passed to them
Expand Down Expand Up @@ -297,7 +297,7 @@ defmodule Cldr.Interval.Backend do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The valid
* `:style` supports different formatting styles. The valid
styles depends on whether formatting is for a date, time or datetime.
Since the functions in this module will make a determination as
to which formatter to be used based upon the data passed to them
Expand Down Expand Up @@ -409,7 +409,7 @@ defmodule Cldr.Interval.Backend do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The valid
* `:style` supports different formatting styles. The valid
styles depends on whether formatting is for a date, time or datetime.
Since the functions in this module will make a determination as
to which formatter to be used based upon the data passed to them
Expand Down
8 changes: 4 additions & 4 deletions lib/cldr/backend/interval/date.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ defmodule Cldr.Date.Interval.Backend do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:date`, `:month_and_day`, `:month`
and `:year_and_month`. The default is `:date`.
Expand Down Expand Up @@ -171,7 +171,7 @@ defmodule Cldr.Date.Interval.Backend do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:date`, `:month_and_day`, `:month`
and `:year_and_month`. The default is `:date`.
Expand Down Expand Up @@ -276,7 +276,7 @@ defmodule Cldr.Date.Interval.Backend do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:date`, `:month_and_day`, `:month`
and `:year_and_month`. The default is `:date`.
Expand Down Expand Up @@ -387,7 +387,7 @@ defmodule Cldr.Date.Interval.Backend do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:date`, `:month_and_day`, `:month`
and `:year_and_month`. The default is `:date`.
Expand Down
4 changes: 2 additions & 2 deletions lib/cldr/backend/interval/time.ex
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ defmodule Cldr.Time.Interval.Backend do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:time`, `:zone`,
and `:flex`. The default is `:time`.
Expand Down Expand Up @@ -158,7 +158,7 @@ defmodule Cldr.Time.Interval.Backend do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:time`, `:zone`,
and `:flex`. The default is `:time`.
Expand Down
6 changes: 3 additions & 3 deletions lib/cldr/date.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule Cldr.Date do
[ex_cldr_calendars](https://hex.pm/packages/ex_cldr_calendars).
CLDR provides standard format strings for `t:Date.t/0` which
are reresented by the formats `:short`, `:medium`, `:long`
are represented by the formats `:short`, `:medium`, `:long`
and `:full`. This abstraction allows for locale-independent
formatting since each locale and calendar may define the underlying
format string as appropriate.
Expand Down Expand Up @@ -64,7 +64,7 @@ defmodule Cldr.Date do
default for partial dates is to derive a candidate format ID from the date and
find the best match from the formats returned by
`Cldr.Date.available_formats/3`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `:locale:` any locale returned by `Cldr.known_locale_names/1`.
The default is `Cldr.get_locale/0`.
Expand Down Expand Up @@ -189,7 +189,7 @@ defmodule Cldr.Date do
default for partial dates is to derive a candidate format from the date and
find the best match from the formats returned by
`Cldr.Date.available_formats/3`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `:locale` is any valid locale name returned by `Cldr.known_locale_names/0`
or a `Cldr.LanguageTag` struct. The default is `Cldr.get_locale/0`.
Expand Down
6 changes: 3 additions & 3 deletions lib/cldr/date_time.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Cldr.DateTime do
Provides localization and formatting of a datetime.
A date time is any `t:DateTime.t/0` or `t:NaiveDateTime.t/0`
struct or aor any map that contains one or more of the keys `:year`, `:month`, `:day`,
struct or any map that contains one or more of the keys `:year`, `:month`, `:day`,
`:hour`, `:minute` and `:second` or `:microsecond` with optional `:time_zone`, `:zone_abbr`,
`:utc_offset`, `:std_offset` and `:calendar` fields.
Expand Down Expand Up @@ -104,7 +104,7 @@ defmodule Cldr.DateTime do
* `:format` is one of `:short`, `:medium`, `:long`, `:full` or a format string or
any of the keys in the map returned by `Cldr.DateTime.Format.date_time_formats/3`.
The default is `:medium`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `:date_format` is any one of `:short`, `:medium`, `:long`, `:full`. If defined,
this option is used to format the date part of the date time. This option is
Expand Down Expand Up @@ -252,7 +252,7 @@ defmodule Cldr.DateTime do
* `:format` is one of `:short`, `:medium`, `:long`, `:full` or a format string or
any of the keys returned by `Cldr.DateTime.Format.date_time_formats/3`.
The default is `:medium`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `:style` is either `:at` or `:default`. When set to `:at` the datetime may
be formatted with a localised string representing `<date> at <time>` if such
Expand Down
10 changes: 5 additions & 5 deletions lib/cldr/interval.ex
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ defmodule Cldr.Interval do
If there is a requirement for repeated use of format strings
then they can be configured in the backend module so that they are
precompiled and therefore not suffer a runtime performance penaly.
precompiled and therefore not suffer a runtime performance penalty.
In a backend module, configure the required formats as a list under the
`:precompile_interval_formats` key:
Expand Down Expand Up @@ -330,7 +330,7 @@ defmodule Cldr.Interval do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The valid
* `:style` supports different formatting styles. The valid
styles depends on whether formatting is for a date, time or datetime.
Since the functions in this module will make a determination as
to which formatter to be used based upon the data passed to them
Expand Down Expand Up @@ -462,7 +462,7 @@ defmodule Cldr.Interval do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The valid
* `:style` supports different formatting styles. The valid
styles depends on whether formatting is for a date, time or datetime.
Since the functions in this module will make a determination as
to which formatter to be used based upon the data passed to them
Expand Down Expand Up @@ -615,7 +615,7 @@ defmodule Cldr.Interval do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The valid
* `:style` supports different formatting styles. The valid
styles depends on whether formatting is for a date, time or datetime.
Since the functions in this module will make a determination as
to which formatter to be used based upon the data passed to them
Expand Down Expand Up @@ -735,7 +735,7 @@ defmodule Cldr.Interval do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The valid
* `:style` supports different formatting styles. The valid
styles depends on whether formatting is for a date, time or datetime.
Since the functions in this module will make a determination as
to which formatter to be used based upon the data passed to them
Expand Down
8 changes: 4 additions & 4 deletions lib/cldr/interval/date.ex
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ defmodule Cldr.Date.Interval do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:date`, `:month_and_day`, `:month`
and `:year_and_month`. The default is `:date`.
Expand Down Expand Up @@ -270,7 +270,7 @@ defmodule Cldr.Date.Interval do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:date`, `:month_and_day`, `:month`
and `:year_and_month`. The default is `:date`.
Expand Down Expand Up @@ -480,7 +480,7 @@ defmodule Cldr.Date.Interval do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:date`, `:month_and_day`, `:month`
and `:year_and_month`. The default is `:date`.
Expand Down Expand Up @@ -586,7 +586,7 @@ defmodule Cldr.Date.Interval do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:date`, `:month_and_day`, `:month`
and `:year_and_month`. The default is `:date`.
Expand Down
4 changes: 2 additions & 2 deletions lib/cldr/interval/time.ex
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ defmodule Cldr.Time.Interval do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:time`, `:zone`,
and `:flex`. The default is `:time`.
Expand Down Expand Up @@ -328,7 +328,7 @@ defmodule Cldr.Time.Interval do
specific format type or a string representing of an interval
format. The default is `:medium`.
* `:style` supports dfferent formatting styles. The
* `:style` supports different formatting styles. The
alternatives are `:time`, `:zone`,
and `:flex`. The default is `:time`.
Expand Down
6 changes: 3 additions & 3 deletions lib/cldr/time.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule Cldr.Time do
[ex_cldr_calendars](https://hex.pm/packages/ex_cldr_calendars)
CLDR provides standard format strings for `Time` which
are reresented by the names `:short`, `:medium`, `:long`
are represented by the names `:short`, `:medium`, `:long`
and `:full`. This allows for locale-independent
formatting since each locale may define the underlying
format string as appropriate.
Expand Down Expand Up @@ -79,7 +79,7 @@ defmodule Cldr.Time do
default for partial times is to derive a candidate format from the time and
find the best match from the formats returned by
`Cldr.Time.available_formats/3`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `:locale` any locale returned by `Cldr.known_locale_names/1`. The default is
`Cldr.get_locale/0`.
Expand Down Expand Up @@ -196,7 +196,7 @@ defmodule Cldr.Time do
default for partial times is to derive a candidate format from the time and
find the best match from the formats returned by
`Cldr.Time.available_formats/3`. See [here](README.md#date-time-and-datetime-localization-formats)
for more information about specifiying formats.
for more information about specifying formats.
* `locale` is any valid locale name returned by `Cldr.known_locale_names/0`
or a `Cldr.LanguageTag` struct. The default is `Cldr.get_locale/0`.
Expand Down

0 comments on commit 6fc4fa0

Please sign in to comment.