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

Make pcal recognise the start day #5

Merged
merged 1 commit into from Aug 1, 2023
Merged

Conversation

choroba
Copy link
Contributor

@choroba choroba commented Jul 31, 2023

The default behaviour of the Unix utility "cal" is to start the week on the day that corresponds to the LC_TIME locale. Under en_GB, it's Monday, under en_US, it's Sunday (and under cs_CZ, it's Pondělí, which corresponds to Monday). Adding the third argument to pcal makes it possible to emulate at least both the English approaches.

The expected behaviour is the following commands should succeed:

pcal 7 2023 1 | diff -wB - <(LC_ALL=en_GB.utf8 cal)
pcal 7 2023 0 | diff -wB - <(LC_ALL=en_US.utf8 cal)

The default behaviour of the Unix utility "cal" is to start the week
on the day that corresponds to the LC_TIME locale. Under en_GB, it's
Monday, under en_US, it's Sunday (and under cs_CZ, it's Pondělí, which
corresponds to Monday). Adding the third argument to pcal makes it
possible to emulate at least both the English approaches.

The expected behaviour is the following commands should succeed:

  pcal 7 2023 1 | diff -wB - <(LC_ALL=en_GB.utf8 cal)
  pcal 7 2023 0 | diff -wB - <(LC_ALL=en_US.utf8 cal)
@choroba
Copy link
Contributor Author

choroba commented Jul 31, 2023

Greetings from the Pull Request Club.

@coveralls
Copy link

Coverage Status

coverage: 98.182%. remained the same when pulling 33b1739 on choroba:start_day into 5c92b76 on davorg:master.

@davorg davorg merged commit 8bdd4fb into davorg-cpan:master Aug 1, 2023
5 checks passed
@davorg
Copy link
Collaborator

davorg commented Aug 1, 2023

Looks good. Thanks.

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.

None yet

3 participants