Skip to content

Commit

Permalink
fixed Issue Humanizr#1186
Browse files Browse the repository at this point in the history
  • Loading branch information
hemalshah28 committed Nov 1, 2022
1 parent 606e958 commit 8cb1ba5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Expand Up @@ -100,7 +100,7 @@ public void DaysAgo(int days, string expected)
[InlineData(1, "tomorrow")]
[InlineData(10, "10 days from now")]
[InlineData(27, "27 days from now")]
[InlineData(32, "one month from now")]
[InlineData(32, "one month from today")]
public void DaysFromNow(int days, string expected)
{
DateHumanize.Verify(expected, days, TimeUnit.Day, Tense.Future);
Expand All @@ -117,7 +117,7 @@ public void MonthsAgo(int months, string expected)
}

[Theory]
[InlineData(1, "one month from now")]
[InlineData(1, "one month from today")]
[InlineData(10, "10 months from now")]
[InlineData(11, "11 months from now")]
[InlineData(12, "one year from now")]
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests.Shared/DateOnlyHumanizeTests.cs
Expand Up @@ -33,7 +33,7 @@ public void DefaultStrategy_MonthApart()
var inputTime = new DateOnly(2015, 08, 05);
var baseTime = new DateOnly(2015, 07, 05);

const string expectedResult = "one month from now";
const string expectedResult = "one month from today";
var actualResult = inputTime.Humanize(baseTime);

Assert.Equal(expectedResult, actualResult);
Expand Down
Expand Up @@ -137,9 +137,9 @@ public void DaysAgo(int days, string expected)
[InlineData(10, "10 days from now")]
[InlineData(20, "20 days from now")]
[InlineData(22, "22 days from now")]
[InlineData(23, "one month from now")]
[InlineData(31, "one month from now")]
[InlineData(43, "one month from now")]
[InlineData(23, "one month from today")]
[InlineData(31, "one month from today")]
[InlineData(43, "one month from today")]
[InlineData(53, "2 months from now")]
public void DaysFromNow(int days, string expected)
{
Expand All @@ -160,7 +160,7 @@ public void MonthsAgo(int months, string expected)
}

[Theory]
[InlineData(1, "one month from now")]
[InlineData(1, "one month from today")]
[InlineData(8, "8 months from now")]
[InlineData(9, "one year from now")]
[InlineData(12, "one year from now")]
Expand Down
Expand Up @@ -81,7 +81,7 @@ public void MonthsAgo(int months, string expected)
}

[Theory]
[InlineData(1, "sebulan dari sekarang")]
[InlineData(1, "sebulan dari hari ini")]
[InlineData(10, "10 bulan dari sekarang")]
public void MonthsFromNow(int months, string expected)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Humanizer/Properties/Resources.id.resx
Expand Up @@ -258,8 +258,8 @@
<comment>a minute from now</comment>
</data>
<data name="DateHumanize_SingleMonthFromNow" xml:space="preserve">
<value>sebulan dari sekarang</value>
<comment>one month from now</comment>
<value>sebulan dari hari ini</value>
<comment>one month from today</comment>
</data>
<data name="DateHumanize_SingleSecondFromNow" xml:space="preserve">
<value>sedetik dari sekarang</value>
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Properties/Resources.resx
Expand Up @@ -223,7 +223,7 @@
<value>a minute from now</value>
</data>
<data name="DateHumanize_SingleMonthFromNow" xml:space="preserve">

This comment has been minimized.

Copy link
@ahdbk

ahdbk Nov 15, 2022

If you are changing now to Today for this case it will be logical to change the data name attribute to DateHumanize_SingleMonthFromToday. What do you think?

<value>one month from now</value>
<value>one month from today</value>
</data>
<data name="DateHumanize_SingleSecondFromNow" xml:space="preserve">
<value>one second from now</value>
Expand Down

0 comments on commit 8cb1ba5

Please sign in to comment.