Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-77366

Consider completely deprecating all uses of strftime (locale) formats in core

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 4.3
    • General
    • MOODLE_403_STABLE

    Description

      This is sort of followup of MDL-75100, where we provided compatibility with strftime() and its formats, by implementing core_date::strftime() that, transparently, converts all formats between the strftime() (locale) ones and the Date/DateTime... (intl/icu) ones.

      So, while everything continues working 100% the same with PHP 8.1 (where strftime() has been deprecated) and up... because of the custom core_date::strftime() implementation above... long term... we need a good plan to get rid of all those locale-based formats once and forever.

      That includes:

      1. Looking for all formats in codebase.
      2. Looking for all formats in lang strings in all languages.
      3. Converting everything to the new int/icu formats.
      4. Move all uses of core_date::strftime() to use native Date/DateTime... functions, directly or using another core_date::format() new method.
      5. Finally, deprecate (and remove) core_date::strftime()
      6. Done, we are 100% free from locale formats forever. Party!

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stronk7 Eloy Lafuente (stronk7)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.