Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Hebrew and other non-Gregorian calendars are broken #16623

@filipnavara

Description

@filipnavara

Mono uses embedded culture data in form of culture-info-tables.h. The code that populates the managed data from it gets two things wrong:

  • It ignores the calendar id and only considers the locale. So, for Hebrew locale and Hebrew calendar you'd still get resources for the Hebrew locale and Gregorian calendar. Naturally this results in incorrect month names and other inaccuracies.
  • Leap month names are never filled in. This causes the managed code to assume that the leap month names are identical to the regular ones. Consequence is that 13th month in a leap year has no name and round-tripping of DateTimes fails.

The code around ves_icall_System_Globalization_CalendarData_fill_calendar_data will likely need to be refactored to fix the problem.

On September 1, 2019 this broke the CI on xunit tests that exercise the round-tripping of current date in the Hebrew calendar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions