Converter of dates and monetary values for frontend and backend return
Project description
Converter of date values ​​and currency values.
Adjusts the values ​​to be able to save to the database and also adjusts some output formats for returns.
To convert a date to the US standard (for database), import NormalizeDates() class from normalize.dates.normalize_dates import NormalizeDates then use NormalizeDates().normalize(string_of_your_date)
Accepted date formats: 20/03/1990 20-30-1990 March 30th, 1990 20 de março de 1990
To convert the date to a detailed format, import ConvertDates() class from normalize.dates.convert_dates import ConvertDates then use ConvertDates(string_your_format).convert(string_of_your_date*) * US standard - 1990-03-20
Accepted formats: /br returns 20/03/1990 full_br returns 20 de março de 1990 full_us returns March 30th, 1990
To convert a currency value, import the NormalizeCurrency() class from normalize.currency.currency import NormalizeCurrency
then use NormalizeCurrency()normalize_currency(string_of_your_currency*) function
Accepted currency: R$ 5.000,00 R$ 5000,00 R$ 5,000 $ 5,000.00
then returns 5000.0
To convert a currency value, import the NormalizeCurrency() class from normalize.currency.currency import NormalizeCurrency
then use NormalizeCurrency(locale*)convert_currency(float_of_your_currency*) function
the “locale” argument return according to the given argument:
locale=”en_US” returns $ 5,000.00 locale=”pt_BR” returns R$ 5.000,00
Change Log
0.0.1 (18/05/2022)
First Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file bwnormalize-0.0.1.tar.gz.
File metadata
- Download URL: bwnormalize-0.0.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a65743d4a9823499ae9999cbdabc25b6cbf176d6bab09eca9f043a2a43a2aa58
|
|
| MD5 |
c46e447116a42873acb693440261819c
|
|
| BLAKE2b-256 |
7cbe1d20e4b6c022474ebd832e342bdc41d9ab486ea8810b31bf869dc20805d1
|