Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@dhis2/cli-app-scripts": "^12.11.5",
"@dhis2/cli-style": "^10.7.10",
"@dhis2/d2-i18n": "^1.1.0",
"@dhis2/ui": "^10.19.0",
"@dhis2/ui": "^10.19.3",
"@storybook/preset-create-react-app": "^10.6.1",
"@storybook/react-webpack5": "^10.6.1",
"@testing-library/dom": "^10.4.2",
Expand All @@ -60,7 +60,7 @@
"styled-jsx": "^4.0.1"
},
"dependencies": {
"@dhis2/multi-calendar-dates": "^1.2.2",
"@dhis2/multi-calendar-dates": "^3.2.1",
"@dnd-kit/core": "^6.0.7",
"@dnd-kit/sortable": "^7.0.2",
"@dnd-kit/utilities": "^3.2.1",
Expand Down
6 changes: 3 additions & 3 deletions src/components/PeriodDimension/PeriodTransfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ const PeriodTransfer = ({
filteredFixedOptions[0]

const now = getNowInCalendar(periodsSettings.calendar)
// use ".eraYear" rather than ".year" because in Ethiopian calendar, eraYear is what our users expect to see (for other calendars, it doesn't matter)
// there is still a pending decision in Temporal regarding which era to use by default: https://github.com/js-temporal/temporal-polyfill/blob/9350ee7dd0d29f329fc097debf923a517c32f813/lib/calendar.ts#L1964
const defaultFixedPeriodYear = now.eraYear || now.year
// in the Ethiopian calendar, eraYear is the year users expect to see (year is
// the Amete Alem year); calendars without eras (e.g. Islamic) only have year
const defaultFixedPeriodYear = now.eraYear ?? now.year

const fixedPeriodConfig = useCallback(
(year) => ({
Expand Down
Loading
Loading