gh-128317: Highlight today in colour in calendar CLI output#128318
Merged
hugovk merged 6 commits intopython:mainfrom Jan 3, 2025
Merged
gh-128317: Highlight today in colour in calendar CLI output#128318hugovk merged 6 commits intopython:mainfrom
hugovk merged 6 commits intopython:mainfrom
Conversation
Misc/NEWS.d/next/Library/2024-12-29-00-33-34.gh-issue-128317.WgFina.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
hugovk
commented
Dec 29, 2024
erlend-aasland
approved these changes
Jan 3, 2025
Member
Author
|
Thanks all for the reviews! |
encukou
reviewed
Jan 3, 2025
| :meth:`setfirstweekday` method. | ||
|
|
||
| .. versionchanged:: next | ||
| If *highlight_day* is given, this date is highlighted in color. |
Member
There was a problem hiding this comment.
Should this say “using terminal escape sequences”?
Member
Author
There was a problem hiding this comment.
Hmm, I think it's more useful to describe the end result rather than the "how".
Member
There was a problem hiding this comment.
That was my intention: mention that you need to print the result to a terminal to see the highlight. If you don't, you'll see some garbage bytes.
WolframAlph
pushed a commit
to WolframAlph/cpython
that referenced
this pull request
Jan 4, 2025
…thon#128318) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
srinivasreddy
pushed a commit
to srinivasreddy/cpython
that referenced
this pull request
Jan 8, 2025
…thon#128318) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Here's the macOS
calcommand:Here's the
calendarCLI output in 3.13:And with this PR:
Especially useful for Twixtmas when you're not sure what day it is!
The usual
PYTHON_COLORS,FORCE_COLORandNO_COLORenv vars can be used to override terminal colour detection.📚 Documentation preview 📚: https://cpython-previews--128318.org.readthedocs.build/