diff --git a/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems b/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems index 29a58cbd2..f571b971a 100644 --- a/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems +++ b/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems @@ -74,6 +74,7 @@ + diff --git a/src/Humanizer.Tests.Shared/Localisation/hr/TimeSpanHumanizeTests.cs b/src/Humanizer.Tests.Shared/Localisation/hr/TimeSpanHumanizeTests.cs new file mode 100644 index 000000000..5cf5886dc --- /dev/null +++ b/src/Humanizer.Tests.Shared/Localisation/hr/TimeSpanHumanizeTests.cs @@ -0,0 +1,22 @@ +using System; +using Xunit; + +namespace Humanizer.Tests.Localisation.hr +{ + [UseCulture("hr-HR")] + public class TimeSpanHumanizeTests + { + [Theory] + [InlineData(1, "1 dan")] + [InlineData(2, "2 dana")] + [InlineData(3, "3 dana")] + [InlineData(4, "4 dana")] + [InlineData(5, "5 dana")] + [InlineData(7, "1 tjedan")] + [InlineData(14, "2 tjedna")] + public void Days(int days, string expected) + { + Assert.Equal(expected, TimeSpan.FromDays(days).Humanize()); + } + } +} diff --git a/src/Humanizer/Properties/Resources.hr.resx b/src/Humanizer/Properties/Resources.hr.resx index 8d7a0b703..436f13840 100644 --- a/src/Humanizer/Properties/Resources.hr.resx +++ b/src/Humanizer/Properties/Resources.hr.resx @@ -171,6 +171,9 @@ {0} dana + + {0} dana + {0} sati @@ -276,4 +279,4 @@ za godinu dana - \ No newline at end of file +