- The library has been rewritten in Typescript and should be fully compatible (without warnings) with React v18!
- I have not noticed any breaking changes, and the API should be backwards compatible with v4.0.6.
- BREAKING: Upgraded React dependency to version
16.8.6
(andreact-scripts
dev dependency to version3.0.0
). - Converted all examples to Storybook stories!
- Added emojis to all weekday and month reckoning functions and calendar UIs!
- Changed the English translation of Cermië to "Reaping Month".
- Changed the English translation of Yavannië to "Fruit Giving".
- Added Sindarin translations for Elvish holiday names.
- Updated descriptions of various Shire Calendar months.
- The UI calendars will now allow each date to set its own
className
, but will continue to use the month'sclassName
if the date'sclassName
isundefined
. This allows the calendar dates passed to each UI calendar to override any individual date's style. See the Middle-earth calendar simulation source for an example of how to override a date cell'sclassName
(to override or unset its background color). - The Shire Calendar UI will now mark Astron 6 and Blotmath 2 as holidays by default.
- The New Reckoning Calendar UI will now mark Yavannië 30 as a holiday by default.
- Shire Reckoning with "traditional" rules now uses Shire-reform starting from T.A. 2703.
- Bumped React dependency version to
15.6.2
. - Replaced the
shire-icalendar.clj
script with a JSX example that uses theShireReckoning
library exports. So now this project is all JS.
- BREAKING: The calendar controls (for picking months, languages, etc.) are no longer exported by this library, but their sources are still available under the examples directory.
- The
ShireReckoning
now exportsREGION_NAMES_TOLKIEN
,REGION_NAMES_SHIRE
, andREGION_NAMES_BREE
constants. - Added "Vertical Month" layout support to the
RivendellCalendar
!
- Fixed calculations for dates observing Daylight Savings Time.
- Starting with v2.0.0,
calendars were off by 1 day when adjusting
Dates of Interest
or the current Gregorian date if the device viewing the calendars was in a region where DST was in effect.
- Starting with v2.0.0,
calendars were off by 1 day when adjusting
- Fixed UI calendars to no longer alter dates passed to them through props.
- Simulation example
Dates of Interest
auto-select bug fix.
- Updated 2017-18 moon phase simulated calendar start dates (see Synchronize settings: Moon phases notes).
- examples/simulated.html now synchronizes with 2017-18 moon phases by default.
-
Calendars can now start reckoning from any date in any year!
-
Added "traditional" Gondor Reckoning rules!
-
Added "traditional" Shire Reckoning rules!
-
See Shire Calendar examples and Gondor Calendar examples for usage examples of different start dates and the "traditional" rules.
-
BREAKING: The following have been removed from
TolkienCalendars
:makeShireCalendarDates
ShireWeekdays
ShireMonths
getShireNewYearDate
makeRivendellCalendarDates
TRADITIONAL_RULES
REFORMED_RULES
RivendellWeekdays
RivendellMonths
getRivendellNewYearDay
getRivendellNewYearDate
isRivendellLeapYear
makeNumenorCalendarDates
RECKONING_KINGS
RECKONING_STEWARDS
RECKONING_NEW
NumenorWeekdays
NumenorMonths
convertGondorianMonthIndex
convertGregorianToGondorianWeekday
convertMonthIndex
convertGregorianWeekday
getNumenorNewYearDate
getNewReckoningNewYearDate
NumenorCalendar
-
Deprecation Upgrade Guide:
- Handle all
Date
vs.number
warnings first.- Most calendar library functions now accept a
Date
instead of anumber
, exceptisRivendellLeapYear
is now the opposite (it accepts anumber
instead of aDate
).
- Most calendar library functions now accept a
- Handle all
make*CalendarDates
warnings fordate
vs.day
next. - Calendar library functions are now bundled under appropriate namespaces,
and functions named with
Numenor
have been renamed to useGondor
instead. Migrate any library function calls to use the new namespace after handling allDate
vs.number
anddate
vs.day
warnings first.- For example, first migrate
TolkienCalendars.isRivendellLeapYear(today)
toTolkienCalendars.isRivendellLeapYear(today.getFullYear())
, then migrate toTolkienCalendars.RivendellReckoning.isRivendellLeapYear(today.getFullYear())
. Do not attempt to callTolkienCalendars.RivendellReckoning.isRivendellLeapYear(today)
, which will break and not give a deprecation warning.
- For example, first migrate
- Handle all
-
Added the following namespaces to
TolkienCalendars
:ShireReckoning
RivendellReckoning
GondorReckoning
-
Added deprecation warnings for the following in
TolkienCalendars
:makeShireCalendarDates
ShireWeekdays
ShireMonths
getShireNewYearDate
makeRivendellCalendarDates
TRADITIONAL_RULES
REFORMED_RULES
RivendellWeekdays
RivendellMonths
getRivendellNewYearDay
getRivendellNewYearDate
isRivendellLeapYear
makeNumenorCalendarDates
RECKONING_KINGS
RECKONING_STEWARDS
RECKONING_NEW
NumenorWeekdays
NumenorMonths
convertGondorianMonthIndex
convertGregorianToGondorianWeekday
convertMonthIndex
convertGregorianWeekday
getNumenorNewYearDate
getNewReckoningNewYearDate
NumenorCalendar
-
GondorCalendar
now defaults to Stewards' Reckoning (the calendar is use during War of the Ring). -
Calendars now support setting their own default captions when their
caption
prop is set totrue
(setting a custom string is still supported as well). -
Calendars now check almost all props for changes in
componentWillReceiveProps
(calendarControls
still only checked at construction).
-
Added the following functions to
TolkienCalendars
:convertGondorianMonthIndex
convertGregorianToGondorianWeekday
-
Added deprecation warnings for the following functions in
TolkienCalendars
:convertMonthIndex
convertGregorianWeekday
- Initial project update as a React 15.4.1 library module!