Skip to content

Commit

Permalink
Add an entry in the Changelog and update the README_EN
Browse files Browse the repository at this point in the history
  • Loading branch information
BeneBr committed Sep 26, 2024
1 parent 8f722c8 commit cf4cb8c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Utilitário `convert_code_to_uf` [#397](https://github.com/brazilian-utils/brutils-python/pull/410)
- Utilitário `convert_date_to_text`[#394](https://github.com/brazilian-utils/brutils-python/pull/415)

## [2.2.0] - 2024-09-12

Expand Down
28 changes: 28 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ False
- [generate\_cep](#generate_cep)
- [get\_address\_from\_cep](#get_address_from_cep)
- [get\_cep\_information\_from\_address](#get_cep_information_from_address)
- [Date](#date)
- [convert\_date\_to_text](#convert_date_to_text)
- [Phone](#phone)
- [is\_valid\_phone](#is_valid_phone)
- [format\_phone](#format_phone)
Expand Down Expand Up @@ -448,6 +450,32 @@ Example:
]
```

## Date

### convert_date_to_text
Convert a brazilian date (dd/mm/yyyy) format in their portuguese textual representation.

Args:
- date (str): A date in a string format dd/mm/yyyy.

Return:
- (str) | None: A portuguese textual representation of the date or None case a date is invalid.


Example:

````python
>>> from brutils.date import convert_date_to_text
>>> convert_date_to_text("25/12/2000")
"Vinte e cinco de dezembro de dois mil"
>>> convert_date_to_text("31/02/2000")
None
>>> convert_date_to_text("29/02/2024")
"Vinte e nove de fevereiro de dois mil e vinte e quatro"
>>> convert_date_to_text("1/08/2024")
"Primeiro de agosto de dois mil e vinte e quatro"
````

## Phone

### is_valid_phone
Expand Down

0 comments on commit cf4cb8c

Please sign in to comment.