Skip to content

Commit b0c09df

Browse files
committed
Update readme with date to words
Changed the readme to add date-to-words documentation.
1 parent 6e0aa69 commit b0c09df

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

readme.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -889,13 +889,15 @@ Passing `wordForm` argument in when it is not applicable will not make any diffe
889889
This is kind of an extension of ToWords and Ordinalize
890890
```C#
891891
// for Spanish locale
892-
new DateTime(2022, 1, 1).ToOrdinalWords() => "uno de enero de dos mil veintidós"
893-
new DateOnly(2020, 6, 10).ToOrdinalWords() => "diez de junio de dos mil veinte"
894-
new DateOnly(1999, 12, 31).ToOrdinalWords() => "treinta y uno de diciembre de mil novecientos noventa y nueve"
892+
new DateTime(2022, 1, 1).ToWords() => "uno de enero de dos mil veintidós"
893+
new DateOnly(2020, 6, 10).ToWords() => "diez de junio de dos mil veinte"
894+
new DateOnly(1999, 12, 31).ToWords() => "treinta y uno de diciembre de mil novecientos noventa y nueve"
895895
// for English UK locale
896-
new DateTime(2022, 1, 1).ToOrdinalWords() => "the first of January two thousand and twenty-two"
896+
new DateTime(2022, 1, 1).ToWords() => "the first of January two thousand and twenty-two"
897+
new DateOnly(1999, 12, 31).ToWords() => "the twenty-first of December one thousand nine hundred and ninety-nine"
897898
// for English US locale
898-
new DateTime(2022, 1, 1).ToOrdinalWords() => "January first, two thousand and twenty-two"
899+
new DateTime(2022, 1, 1).ToWords() => "January first, two thousand and twenty-two"
900+
new DateOnly(1999, 12, 31).ToWords() => "December twenty-first, one thousand nine hundred and ninety-nine"
899901
```
900902

901903
The ToWords method of `DateTime` or `DateOnly` also supports grammatical case.

0 commit comments

Comments
 (0)