Changelog for Cldr Calendars v0.8.0
This is the changelog for Cldr v0.8.0 released on June 8th, 2019. For older changelogs please consult the release tag on GitHub
Enhancements
Adds option
:type
toCldr.Calendar.localize/3
. This determines the format type to be localized. The valid types are:format
(the default) or:stand_alone
.Add
Cldr.Calendar.day_periods/2
to support localization of the day periods of a timeAdd
Cldr.Calendar.default_calendar/0
. ReturnsCldr.Calendar.Gregorian
Add
Cldr.Calendar.default_cldr_calendar/0
. Returns:gregorian
Changelog for Cldr Calendars v0.7.0
This is the changelog for Cldr v0.7.0 released on June 1st, 2019. For older changelogs please consult the release tag on GitHub
Breaking Changes
- Moved
year/1
,quarter/1
,month/1
,week/1
andday/1
to a new moduleCldr.Calendar.Interval
Enhancements
Adds
Cldr.Calendar.Interval.compare/2
to compare two intervals (date ranges) using Allen's Interval Algebra taxonomy.Defaults the calendar to
Cldr.Calendar.Gregorian
forCldr.Calendar.Interval.year/2
,Cldr.Calendar.Interval.quarter/3
,Cldr.Calendar.Interval.month/3
,Cldr.Calendar.Interval.week/3
andCldr.Calendar.Interval.day/3
Changelog for Cldr Calendars v0.6.0
This is the changelog for Cldr v0.6.0 released on April 28th, 2019. For older changelogs please consult the release tag on GitHub
Enhancements
- Remove the need for nimble_csv as a dependency
Changelog for Cldr Calendars v0.5.0
This is the changelog for Cldr v0.5.0 released on April 21th, 2019. For older changelogs please consult the release tag on GitHub
Breaking changes
Cldr.Calendar.localize/3
for:days_of_week
now returns a list of 2-tuples that are of the format{day_of_week, day_name}
.
Enhancements
- Add
Cldr.Calendar.localize/6
which localises numbers as part of a date without parameter checking. This is considered a private implementation for now.
Changelog for Cldr Calendars v0.4.1
This is the changelog for Cldr v0.4.1 released on April 19th, 2019. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Fix calculation of
days_in_month
for the last month in long year of a week-based calendar
Changelog for Cldr Calendars v0.4.0
This is the changelog for Cldr v0.4.0 released on April 19th, 2019. For older changelogs please consult the release tag on GitHub
Enhancements
Adds
Cldr.Calendar.interval_stream/3
which returns a stream function that when enumerated generates a list of dates with a specified precision of either:years
,:quarters
,:months
,:weeks
or:days
. This function has the same arguments and generates the same results asCldr.Calendar.interval/3
except it generates the results lazily.Adds
:days_of_week
option toCldr.Calendar.localize/3
which returns a list of the localized names of the days of the week in calendar order.Adds
calendar_base/0
to identify whether the calendar is week or month based.
Bug Fixes
- Fix
Cldr.Calendar.day_of_week/1
for week-based calendars
Changelog for Cldr Calendars v0.3.0
This is the changelog for Cldr v0.3.0 released on April 16th, 2019. For older changelogs please consult the release tag on GitHub
Enhancements
- Adds
Cldr.Calendar.interval/3
which generates an enumerable list of dates with a specified precision of either:years
,:quarters
,:months
,:weeks
or:days
.
Examples:
iex> import Cldr.Calendar.Sigils
Cldr.Calendar.Sigils
iex> d = ~d[2019-01-31]
%Date{calendar: Cldr.Calendar.Gregorian, day: 31, month: 1, year: 2019}
iex> d2 = ~d[2019-05-31]
%Date{calendar: Cldr.Calendar.Gregorian, day: 31, month: 5, year: 2019}
iex> Cldr.Calendar.interval d, 3, :months
[
%Date{calendar: Cldr.Calendar.Gregorian, day: 28, month: 2, year: 2019},
%Date{calendar: Cldr.Calendar.Gregorian, day: 31, month: 3, year: 2019},
%Date{calendar: Cldr.Calendar.Gregorian, day: 30, month: 4, year: 2019}
]
iex> Cldr.Calendar.interval d, d2, :months
[
%Date{calendar: Cldr.Calendar.Gregorian, day: 31, month: 1, year: 2019},
%Date{calendar: Cldr.Calendar.Gregorian, day: 28, month: 2, year: 2019},
%Date{calendar: Cldr.Calendar.Gregorian, day: 31, month: 3, year: 2019},
%Date{calendar: Cldr.Calendar.Gregorian, day: 30, month: 4, year: 2019},
%Date{calendar: Cldr.Calendar.Gregorian, day: 31, month: 5, year: 2019}
]
Changelog for Cldr Calendars v0.2.0
This is the changelog for Cldr v0.2.0 released on April 14th, 2019. For older changelogs please consult the release tag on GitHub
Breaking Changes
All calendars now return
{year, month, day}
tuples fromdate_from_iso_days/1
. Previously in some cases they returned aDate.t
first_day_of_year/1
andlast_day_of_year/1
,first_gregorian_day_of_year/1
andlast_gregorian_day_of_year/1
now all return aDate.t
or an error tuple. Previously the returned result types were inconsistent.Remove
first_gregorian_day_of_year/1
andlast_gregorian_day_of_year/1
fromCldr.Calendar
callbacks.
Enhancements
- Adds
Cldr.Calendar.Julian
implementing the Julian calendar. This calendar does not implementweek/2
,week_of_year/3
oriso_week_of_year/3
.
Bug Fixes
- Fixes calculating negative offsets for months in a week-based calendar. Thanks to @bglusman. Closes #2.
Changelog for Cldr Calendars v0.1.0
This is the changelog for Cldr v0.1.0 released on April 5th, 2019. For older changelogs please consult the release tag on GitHub
Enhancements
- Initial release. See the README for a description of this project.