Types/System.DateTime.types.ps1xml
<?xml version="1.0" encoding="utf-8"?> <Types> <Type> <Name>System.DateTime</Name> <Members> <ScriptProperty> <Name>ToOrdinalWords</Name> <GetScriptBlock>[OutputType([System.String])] param() [Humanizer.DateToOrdinalWordsExtensions]::ToOrdinalWords($this) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>AtMidnight</Name> <GetScriptBlock>[OutputType([System.DateTime])] param() [Humanizer.PrepositionsExtensions]::AtMidnight($this) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>AtNoon</Name> <GetScriptBlock>[OutputType([System.DateTime])] param() [Humanizer.PrepositionsExtensions]::AtNoon($this) </GetScriptBlock> </ScriptProperty> <ScriptMethod> <Name>Humanize</Name> <Script> [OutputType([System.String])] param([bool]$UTC = $false) [Humanizer.DateHumanizeExtensions]::Humanize($this, $UTC) </Script> </ScriptMethod> </Members> </Type> </Types> |