Skip to content

Croatian localization of TimeSpan fails with >1 day #597

Closed
@lzybkr

Description

@lzybkr

My repro is using PowerShell, but there is a null reference exception when the number of days is > 1 and the culture is hr.

#32 PS> [Humanizer.TimeSpanHumanizeExtensions]::Humanize([timespan]::new(1,1,1,1,1), 5, [CultureInfo]'hr')
1 dan, 1 sat, 1 minuta, 1 sekunda, 1 milisekunda

#33 PS> [Humanizer.TimeSpanHumanizeExtensions]::Humanize([timespan]::new(2,1,1,1,1), 5, [CultureInfo]'hr')
Exception calling "Humanize" with "3" argument(s): "Value cannot be null.
Parameter name: format"
At line:1 char:1
+ [Humanizer.TimeSpanHumanizeExtensions]::Humanize([timespan]::new(2,1, ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions