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

Add new features(Specify the end date) #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HashCookie
Copy link

  1. Introduced a new command-line argument --end_date:
  • Within the arguments function, Added a new argument -ed or --end_date that allows users to specify an end date for the commits.
  1. Calculated the total number of days for commits:
  • In the main function, Added a conditional check to see if the --end_date argument was provided.
  • If --end_date was given, Calculated the number of days from start_date to end_date and stored it in the total_days variable.
  • If --end_date wasn't provided, then total_days is the sum of days_before and days_after.
  1. Modified the commit loop:
  • Adjusted the primary for loop to use total_days as its range instead of the original days_before + days_after.
  1. Removed redundant code:
  • Removed a redundant if args.end_date: block since total_days was already calculated in the previous code.

With these modifications, the following features have been added to the script:

  • Allow users to specify an end date for commits.
  • Calculate the total number of days for commits based on the specified end date.
  • Ensure commits are made within the specified date range.

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.

1 participant