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

fix: show correct weekday in exams #1012

Merged
merged 1 commit into from
Oct 10, 2023
Merged

fix: show correct weekday in exams #1012

merged 1 commit into from
Oct 10, 2023

Conversation

limwa
Copy link
Member

@limwa limwa commented Oct 10, 2023

This PR changes the weekday selection logic to show the correct weekday for an exam.

The internationalization library we are using returns a list of weekdays from Sunday through Saturday. The weekday property on DateTimes returns a number from 1 (Monday) through 7 (Sunday). This means that weekday % 7 must be used instead of weekday - 1.

Review checklist

  • Terms and conditions reflect the current change
  • Contains enough appropriate tests
  • If aimed at production, writes a new summary in whatsnew/whatsnew-pt-PT
  • Properly adds an entry in changelog.md with the change
  • If PR includes UI updates/additions, its description has screenshots
  • Behavior is as expected
  • Clean, well-structured code

@limwa limwa changed the base branch from develop to master October 10, 2023 07:26
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #1012 (f200a5a) into master (6ef9a17) will not change coverage.
Report is 1 commits behind head on master.
The diff coverage is 100%.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1012   +/-   ##
======================================
  Coverage      16%     16%           
======================================
  Files         201     201           
  Lines        6361    6361           
======================================
  Hits          986     986           
  Misses       5375    5375           

@limwa limwa requested review from bdmendes and LuisDuarte1 October 10, 2023 08:12
Copy link
Member

@LuisDuarte1 LuisDuarte1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch 🚀

@limwa limwa enabled auto-merge October 10, 2023 08:16
@limwa limwa merged commit b3f051d into master Oct 10, 2023
6 checks passed
@limwa limwa deleted the hotfix/exam-weekdays branch October 10, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants