Changes between Initial Version and Version 1 of Ticket #36145, comment 3


Ignore:
Timestamp:
Feb 6, 2025, 2:34:59 PM (6 days ago)
Author:
Ryan Heo

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36145, comment 3

    initial v1  
    77}}}
    88
    9 I found the test code for the 'FIRST_DAY_OF_WEEK' attribute in tests>i18n>tests.py line 697.
     9I found the test code for the {{{FIRST_DAY_OF_WEEK}}} attribute in {{{tests>i18n>tests.py}}} line 697.
    1010It says that locale's formats take precedence over the default settings.
    11 When I checked with several locale's formats files, I found that some of them have the 'FIRST_DAY_OF_WEEK' attribute while others don't have it.
    12 Since the locale's formats take precedence, you can't change the 'FIRST_DAY_OF_WEEK' attribute if the locale's file has it.
    13 If it doesn't have the attribute, such as LANGUAGE_CODE = 'ko,' you can simply change it in the settings.py.
     11When I checked with several locale's formats files, I found that some of them have the {{{FIRST_DAY_OF_WEEK}}} attribute while others don't have it.
     12Since the locale's formats take precedence, you can't change the {{{FIRST_DAY_OF_WEEK}}} attribute if the locale's file has it.
     13If it doesn't have the attribute such as {{{LANGUAGE_CODE='ko'}}}, you can simply change it in the settings.py.
    1414
    1515Now I have found a bug. On the documentation, it says the following.
     
    1717    A number representing the first day of the week. This is especially useful when displaying a calendar. This value is only used when not using format internationalization, or when a format cannot be found for the current locale.
    1818
    19 When I used USE_I18N=False, I couldn't use the FIRST_DAY_OF_WEEK as I wanted.
    20 I think this is because 'USE_L10N' was removed from v5.0 but is still used in the 'get_format' function in django>utils>formats.py rather than use_i18n.
     19When I used {{{USE_I18N=False}}}, I couldn't use the {{{FIRST_DAY_OF_WEEK}}} as I wanted.
     20I think this is because {{{USE_L10N}}} was removed from v5.0 but is still used in the 'get_format' function in {{{django>utils>formats.py}}} rather than use_i18n.
    2121I will keep working on this issue to remove the use_l10n part from the get_format and follow the current documentation.
Back to Top