Bug 463196 - Digital Clock widget in plasma shows wrong month name for Persian calendar
Summary: Digital Clock widget in plasma shows wrong month name for Persian calendar
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock (show other bugs)
Version: 5.26.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-18 16:16 UTC by Kian kazem
Modified: 2022-12-19 17:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kian kazem 2022-12-18 16:16:39 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Add Digital Clock to your panel
2. Enter Configure Digital Clock and go to the Alternativ Calendar tab
3. Select "The Solar Hijri" a.k.a Persian calendar

OBSERVED RESULT
it shows 27 September 1401

EXPECTED RESULT
Today is 18 December 2022, in the Persian calendar it is 27 Azar 1401
Azar is the 9th month in the Persian calendar and September is also the 9th month, 
probably missing the name of the Persian calendar months.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: ArcoLinux 
(available in About System)
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Comment 1 Fushan Wen 2022-12-18 16:48:01 UTC
Do you have a full list of month names in Persian calendar?
Comment 2 Bug Janitor Service 2022-12-18 17:24:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/295
Comment 3 Bug Janitor Service 2022-12-19 13:19:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kdeclarative/-/merge_requests/165
Comment 4 Bug Janitor Service 2022-12-19 13:19:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/296
Comment 5 Fushan Wen 2022-12-19 14:32:24 UTC
Git commit 641153538b341a7d1fd00ac62b48c5c6a5704fdd by Fushan Wen.
Committed on 19/12/2022 at 14:32.
Pushed by fusionfuture into branch 'master'.

alternatecalendar: port `QDate` to `QCalendar::YearMonthDay`

Not all dates from some alternate calendar systems can be accommodated
by QDate, for example, in Persian calendar, the second month has 31
days. QCalendar::YearMonthDay is a data structure to solve the problem.

`alternateDateReady` is not changed since more changes will depend on
some changes in KF6.
FIXED-IN: 5.27

M  +3    -2    plasmacalendarplugins/alternatecalendar/alternatecalendarplugin.cpp
M  +3    -3    plasmacalendarplugins/alternatecalendar/provider/abstractcalendarprovider.cpp
M  +1    -1    plasmacalendarplugins/alternatecalendar/provider/abstractcalendarprovider.h
M  +2    -2    plasmacalendarplugins/alternatecalendar/provider/icucalendar_p.cpp
M  +3    -2    plasmacalendarplugins/alternatecalendar/provider/icucalendar_p.h
M  +4    -4    plasmacalendarplugins/alternatecalendar/provider/indiancalendar.cpp
M  +1    -1    plasmacalendarplugins/alternatecalendar/provider/indiancalendar.h
M  +12   -8    plasmacalendarplugins/alternatecalendar/provider/qtcalendar.cpp
M  +1    -1    plasmacalendarplugins/alternatecalendar/provider/qtcalendar.h

https://invent.kde.org/plasma/kdeplasma-addons/commit/641153538b341a7d1fd00ac62b48c5c6a5704fdd
Comment 6 Fushan Wen 2022-12-19 15:20:32 UTC
Git commit 9b5d4276f5b109eeaa0789f120d867e716ed6346 by Fushan Wen.
Committed on 19/12/2022 at 13:11.
Pushed by fusionfuture into branch 'master'.

calendarevents: add new alternate date ready signal and deprecate the old one

Some calendar systems, like Persian, do not always fit in Gregorian
date. For example, there are 31 days in the 2nd month (Ordibehesht), and
QDate can't store the date, hence use QCalendar::YearMonthDay instead.

M  +12   -1    src/calendarevents/calendareventsplugin.h

https://invent.kde.org/frameworks/kdeclarative/commit/9b5d4276f5b109eeaa0789f120d867e716ed6346
Comment 7 Fushan Wen 2022-12-19 17:00:24 UTC
Git commit 6d95df9e63be399940dd358f4934db5d1d75999a by Fushan Wen.
Committed on 19/12/2022 at 17:00.
Pushed by fusionfuture into branch 'cherry-pick-64115353'.

alternatecalendar: port `QDate` to `QCalendar::YearMonthDay`

Not all dates from some alternate calendar systems can be accommodated
by QDate, for example, in Persian calendar, the second month has 31
days. QCalendar::YearMonthDay is a data structure to solve the problem.

`alternateDateReady` is not changed since more changes will depend on
some changes in KF6.
FIXED-IN: 5.27


(cherry picked from commit 641153538b341a7d1fd00ac62b48c5c6a5704fdd)

M  +3    -2    plasmacalendarplugins/alternatecalendar/alternatecalendarplugin.cpp
M  +3    -3    plasmacalendarplugins/alternatecalendar/provider/abstractcalendarprovider.cpp
M  +1    -1    plasmacalendarplugins/alternatecalendar/provider/abstractcalendarprovider.h
M  +2    -2    plasmacalendarplugins/alternatecalendar/provider/icucalendar_p.cpp
M  +3    -2    plasmacalendarplugins/alternatecalendar/provider/icucalendar_p.h
M  +4    -4    plasmacalendarplugins/alternatecalendar/provider/indiancalendar.cpp
M  +1    -1    plasmacalendarplugins/alternatecalendar/provider/indiancalendar.h
M  +12   -8    plasmacalendarplugins/alternatecalendar/provider/qtcalendar.cpp
M  +1    -1    plasmacalendarplugins/alternatecalendar/provider/qtcalendar.h

https://invent.kde.org/plasma/kdeplasma-addons/commit/6d95df9e63be399940dd358f4934db5d1d75999a
Comment 8 Fushan Wen 2022-12-19 17:05:53 UTC
Can only be fixed in 5.27 since a new string is added