Skip to content

Adjust commitsByYear() to support multiple dates#174

Merged
arzzen merged 1 commit intogit-quick-stats:masterfrom
tomice:master
Oct 6, 2024
Merged

Adjust commitsByYear() to support multiple dates#174
arzzen merged 1 commit intogit-quick-stats:masterfrom
tomice:master

Conversation

@tomice
Copy link
Copy Markdown
Collaborator

@tomice tomice commented Oct 3, 2024

  • commitsByYear() previously could only support Default-style dates for git log. However, a user can use a variety of different date formats such as relative, default, iso, rfc, short, and raw.

    This change modifies commitsByYear() to handle multiple different date strings

Fixes #172

* commitsByYear() previously could only support Default-style
  dates for git log. However, a user can use a variety of different
  date formats such as relative, default, iso, rfc, short, and raw.

  This change modifies commitsByYear() to handle multiple different
  date strings

Fixes git-quick-stats#172
@tomice
Copy link
Copy Markdown
Collaborator Author

tomice commented Oct 3, 2024

Tested by setting $_GIT_SINCE to various different strings:

UNIX: 1697375696
Default: Mon Oct 15 12:34:56 2023 +0000
Relative: 2 weeks ago
European: 15/10/2023
Single-Digit Day and Month: 1 Jan 2021
ISO: 2023-10-15 12:34:56 +0000
RFC: Mon, 15 Oct 2023 12:34:56 +0000
Short: 2023-10-15

Calculation of dates should now occur for (nearly?) all cases that date recognizes.

@tomice
Copy link
Copy Markdown
Collaborator Author

tomice commented Oct 3, 2024

Also creates a workaround to address #168. git-quick-stats will now display the usage() function when attempting to execute the application outside of a git directory.

@arzzen
Copy link
Copy Markdown
Member

arzzen commented Oct 6, 2024

lgtm

@arzzen arzzen merged commit 3cce04d into git-quick-stats:master Oct 6, 2024
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.

[commits-by-year]: seq: unrecognized option '--since=2017-01-15 18:11:22 +0100'

2 participants