-
Notifications
You must be signed in to change notification settings - Fork 965
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1172 from ohmineer/main
- Loading branch information
Showing
30 changed files
with
2,694 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/Humanizer.Tests.Shared/Localisation/es/DateToOrdinalWordsTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
|
||
using Xunit; | ||
|
||
namespace Humanizer.Tests.Localisation.es | ||
{ | ||
[UseCulture("es-ES")] | ||
public class DateToOrdinalWordsTests | ||
{ | ||
[Fact] | ||
public void OrdinalizeString() | ||
{ | ||
Assert.Equal("25 de enero de 2022", new DateTime(2022, 1, 25).ToOrdinalWords()); | ||
Assert.Equal("29 de febrero de 2020", new DateTime(2020, 2, 29).ToOrdinalWords()); | ||
Assert.Equal("4 de septiembre de 2015", new DateTime(2015, 9, 4).ToOrdinalWords()); | ||
Assert.Equal("7 de noviembre de 1979", new DateTime(1979, 11, 7).ToOrdinalWords()); | ||
} | ||
|
||
#if NET6_0_OR_GREATER | ||
[Fact] | ||
public void OrdinalizeDateOnlyString() | ||
{ | ||
Assert.Equal("25 de enero de 2022", new DateOnly(2022, 1, 25).ToOrdinalWords()); | ||
Assert.Equal("29 de febrero de 2020", new DateOnly(2020, 2, 29).ToOrdinalWords()); | ||
Assert.Equal("4 de septiembre de 2015", new DateOnly(2015, 9, 4).ToOrdinalWords()); | ||
Assert.Equal("7 de noviembre de 1979", new DateOnly(1979, 11, 7).ToOrdinalWords()); | ||
} | ||
#endif | ||
} | ||
} |
Oops, something went wrong.