Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format: Intl readable datetime rewrite usages #1760

Merged

Conversation

yookoala
Copy link
Member

@yookoala yookoala commented Nov 21, 2023

Description

Note that the formatting strign '%e' (day of month with leading space) has no equivlant in intl module. They are all rewritten with 'd' formatter, which is only the digit without leading space. These are all the occurrence of such '%e' refactors:

  • modules/Activities/activities_attendance.php
  • modules/Activities/report_attendance.php
  • modules/Attendance/attendance_future_byPerson.php
  • modules/Planner/units_edit_deploy.php
  • modules/Planner/units_edit_working.php
  • modules/Reports/reporting_my.php
  • modules/Reports/templates/ui/reportingCycleHeader.twig.html
  • modules/Staff/coverage_planner_assign.php
  • modules/Staff/report_absences_summary.php
  • modules/Staff/report_subs_availability.php
  • modules/Staff/report_subs_availabilityWeekly.php
  • modules/Staff/src/Messages/CoveragePartial.php
  • modules/Staff/src/Tables/AbsenceCalendar.php
  • modules/Staff/src/Tables/CoverageCalendar.php

Motivation and Context

How Has This Been Tested?

  • Locally
  • CI environment (with the newly written tests)

* dateIntlReadable to replace dateReadable
* dateTimeIntlReadable to replace dateTimeReadable
* Add test coverage to Format::dateTimeReadable,
  Format::dateIntlReadable and Format::dateTimeIntlReadable.
Refactor with unit test verification
* modules/Planner/units_edit_deploy.php
* modules/Students/student_view_details.php
Refactor with unit test verification
* modules/Attendance/attendance_future_byPerson.php
Refactor with unit test verification
* modules/Attendance/report_graph_byType.php
Refactor with unit test verification
* modules/Attendance/attendance.php
* modules/Attendance/report_courseClassesNotRegistered_byDate_print.php
* modules/Attendance/report_formGroupsNotRegistered_byDate_print.php
* modules/Attendance/report_formGroupsNotRegistered_byDate.php
* modules/Attendance/src/AttendanceView.php

refactor: dateIntlReadable refactor 2

Refactor with unit test verification
* modules/Attendance/report_courseClassesNotRegistered_byDate.php
Changes that default format tests already cover:
* modules/Admissions/src/Forms/ApplicationMilestonesForm.php
* modules/Reports/archive_byStudent_view.php
* modules/Reports/reporting_access_manage.php
* modules/System Admin/import_manage.php
* modules/Timetable/report_viewAvailableSpace_view.php
* modules/Timetable/report_viewAvailableTeachers_view.php

    refactor: dateIntlReadable refactor 5

* modules/Staff/src/Messages/NewAbsenceWithCoverage.php
Refactor with unit test verification
* modules/Reports/reporting_my.php
* modules/Activities/report_attendance.php
Refactor with unit test verification
* modules/Staff/src/Forms/CoverageRequestForm.php
Refactor with unit test verification
* modules/Activities/activities_attendance.php
Refactor with unit test verification
* modules/Staff/src/Tables/AbsenceCalendar.php
Refactor with unit test verification
* modules/Staff/src/Tables/CoverageDates.php
Refactor with unit test verification
* modules/Staff/src/Tables/CoverageCalendar.php
Refactor with unit test verification
* modules/Staff/src/Messages/CoveragePartial.php
Refactor with unit test verification
* modules/Staff/report_subs_availability.php
Refactor with unit test verification
* modules/Staff/coverage_my.php
Refactor with unit test verification
* modules/Staff/report_coverage_summary.php
Refactor with unit test verification
* modules/Staff/coverage_planner.php
Refactor with unit test verification
* modules/Staff/report_absences_weekly.php
Refactor with unit test verification
* modules/Staff/report_subs_availabilityWeekly.php
Refactor with unit test verification
* modules/Planner/units_edit_working.php
Refactor with unit test verification
* modules/Staff/report_absences_summary.php
Changes that default format tests already cover:
* modules/Admissions/admissions_manage_edit.php
* modules/Reports/archive_byReport.php
* modules/Reports/reporting_cycles_manage.php
* modules/Reports/templates/reports/coverPage.twig.html
* modules/Reports/templates/reports/footers/signatureBox.twig.html
* modules/Reports/templates/reports/footers/signatureLine.twig.html
* modules/Reports/templates/reports/headers/reportInfo.twig.html
* modules/Reports/templates/reports/studentDetails.twig.html
* modules/Reports/templates/ui/reportingCycleHeader.twig.html
* modules/Staff/coverage_availability.php
* modules/Staff/coverage_manage_addAjax.php
* modules/Staff/coverage_planner_assign.php
* modules/Staff/src/Forms/CoverageRequestForm.php
* modules/Staff/src/Tables/AbsenceDates.php
Refactor with unit test verification
* modules/Reports/templates/ui/reportingCycleHeader.twig.html
* modules/Staff/coverage_planner_assign.php
* Use Format::dateTimeIntlReadable to replace all basic
  Format::dateTimeReadable usages (without specified formatting string).
* Use Format::dateIntlReadable to replace all advance Format::dateTimeReadable
  usages.
* Add unit test for fidelity checks.
@SKuipers SKuipers force-pushed the feat/intl-readable-datetime-rewrite-usages branch from 82b5cf2 to 2520839 Compare May 17, 2024 02:55
@SKuipers SKuipers changed the title WIP: Intl readable datetime rewrite usages Format: Intl readable datetime rewrite usages May 17, 2024
@SKuipers SKuipers merged commit 974e078 into GibbonEdu:v27.0.00 May 17, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants