diff --git a/Types/git.log/Alias.psd1 b/Types/git.log/Alias.psd1 index 516085bb..bbd38090 100644 --- a/Types/git.log/Alias.psd1 +++ b/Types/git.log/Alias.psd1 @@ -2,4 +2,5 @@ Notes = 'Note' Trailers = 'Trailer' Changes = 'Change' + Date = 'CommitDate' } \ No newline at end of file diff --git a/Types/git.log/get_CommitDate.ps1 b/Types/git.log/get_CommitDate.ps1 new file mode 100644 index 00000000..c45fd471 --- /dev/null +++ b/Types/git.log/get_CommitDate.ps1 @@ -0,0 +1,7 @@ +<# +.SYNOPSIS + Gets the date of a git log +.DESCRIPTION + Gets the commit date of a git log entry. +#> +return [datetime]::ParseExact($this.CommitDateString.Trim(), "ddd MMM d HH:mm:ss yyyy K", [cultureinfo]::InvariantCulture)