79695294

Date: 2025-07-09 08:09:48
Score: 0.5
Natty:
Report link

If you are in shell/bash, and want to search for all PRs created after say 4 weeks ago, and not a specific date, you can try a variant of what @artur replied, using the excellent gnu date utility, e g:

AGODATE="$(date -d "-4 weeks" '+%Y-%m-%d')"
echo $AGODATE
gh pr list --state all --search "created:\>$AGODATE"  

Or as a oneliner:

gh pr list --state all --search "created:\>$(date -d "-4 weeks" '+%Y-%m-%d')"

This works fine in git-bash on windows also.

Have not tested macos, since it is bsd lineage, it might not have gnu date and the date it has might not have this.


Note: I am including all PRs, open /closed/merged by setting the --state switch explicitly. If not, it will just show all open PRs.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @artur
  • Low reputation (0.5):
Posted by: mawi