You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Named git dates like 1week, 3months, etc will fail when used by ugit -Since <date>
Because the strings fail coercing on parameterbinding as [datetime]
throw when used with git -Since <date>
Dates like 1week work for git.exe --since <date>
Expected Behavior: Like git.exe
>git.exe log --since 1week # 👍 works
Behavior ugit
# 👍 works
> git log -Since ( [datetime]::Now.AddDays(-7) )
# 🔴 Errors
> git log -Since 1week
Cannot process argument transformation on parameter 'After'. Cannot convert value "1week" to type "System.DateTime". Error: "The string '1week' was not recognized as a valid DateTime. There is an unknown word starting at index '1'."
Fix
I could write a PR if you know where in the docs git.exe defines valid <dates>. I did not have luck googling.
I thought maybe the datatype could stay as a [datetime] if an ArgumentTransformation first converts the strings to datetime? ( I'd have to test whether binding and transform requires the type to be [object] or not -- in pwsh )
The text was updated successfully, but these errors were encountered:
ninmonkey
changed the title
git log -Since <date> should support <date> values like 1weekgit log -Since <date> should support git.exe dates like 1weekJul 27, 2024
Named git dates like
1week
,3months
, etc will fail when used byugit -Since <date>
Because the strings fail coercing on parameterbinding as
[datetime]
throw when used with
git -Since <date>
Dates like
1week
work forgit.exe --since <date>
Expected Behavior: Like
git.exe
Behavior
ugit
Fix
I could write a PR if you know where in the docs
git.exe
defines valid<dates>
. I did not have luck googling.I thought maybe the datatype could stay as a
[datetime]
if an ArgumentTransformation first converts the strings to datetime? ( I'd have to test whether binding and transform requires the type to be[object]
or not -- in pwsh )The text was updated successfully, but these errors were encountered: