diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 26f36a2..40feb1d 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -20,8 +20,7 @@ jobs: - name: test run: flutter test --coverage - # Run Codecov - - name: Codecov + - name: codecov uses: codecov/codecov-action@v3.1.1 - uses: bluefireteam/flutter-gh-pages@v7 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d09d0d..8ae4408 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.9.0 +- Novos métodos em `UtilData`: obterDateTimeHora e obterDateTimeHoraMinuto. +- Ajustes no worflow.yml + ## 1.8.1 - Atualiza README e `pubspec.yaml`. diff --git a/README.md b/README.md index b913bea..ce20c0f 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,8 @@ A classe `UtilData` possui métodos que facilitam obter o valor de um objeto `Da - `UtilData.obterMes` - `UtilData.obterDia` - `UtilData.obterDateTime` +- `UtilData.obterDateTimeHora` +- `UtilData.obterDateTimeHoraMinuto` A classe `UtilBrasilFields` possui métodos que facilitam obter os valores CEP, KM, CPF e CPNJ já formatados: diff --git a/example/pubspec.lock b/example/pubspec.lock index 346371d..ee4c347 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -21,7 +21,7 @@ packages: path: ".." relative: true source: path - version: "1.8.1" + version: "1.9.0" characters: dependency: transitive description: diff --git a/lib/src/util/util_data.dart b/lib/src/util/util_data.dart index acac032..1d64dce 100644 --- a/lib/src/util/util_data.dart +++ b/lib/src/util/util_data.dart @@ -93,7 +93,7 @@ class UtilData { /// Retorna um objeto [DateTime] de acordo com a data informada. /// - /// Informar a String `data` no formato `DD/MM/AAAA` + /// Informar a string `data` no formato `DD/MM/AAAA` static DateTime obterDateTime(String data) { initializeDateFormatting(); return DateFormat.yMd("pt_BR").parse(data); @@ -101,7 +101,7 @@ class UtilData { /// Retorna um objeto [DateTime] de acordo com a data informada. /// - /// Informar a String `data` no formato `DD/MM/AAAA HH:MM` + /// Informar a string `data` no formato `DD/MM/AAAA HH:MM` static DateTime obterDateTimeHora(String data) { initializeDateFormatting(); return DateFormat.yMd("pt_BR").add_jm().parse(data); @@ -109,8 +109,8 @@ class UtilData { /// Retorna um objeto [DateTime] de acordo com a data informada. /// - /// Informar a String `data` no formato `HH:MM` - static DateTime obterHoraMinuto(String data) { + /// Informar a string `data` no formato `HH:MM` + static DateTime obterDateTimeHoraMinuto(String data) { initializeDateFormatting(); return DateFormat.jm("pt_BR").parse(data); } diff --git a/pubspec.yaml b/pubspec.yaml index 5956024..a92a7ae 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: brasil_fields description: O jeito mais fácil de utilizar padrões e formatos brasileiros em seu projeto Dart. -version: 1.8.1 +version: 1.9.0 homepage: https://github.com/flutterbootcamp/brasil_fields repository: https://github.com/flutterbootcamp/brasil_fields issue_tracker: https://github.com/flutterbootcamp/brasil_fields/issues diff --git a/test/util_brasil_fields_test.dart b/test/util_brasil_fields_test.dart index dd235dc..3d14d9a 100644 --- a/test/util_brasil_fields_test.dart +++ b/test/util_brasil_fields_test.dart @@ -215,7 +215,7 @@ void main() { test('31/12/2022 23:41:06', () { const data = '23:41'; - var dateTime = UtilData.obterHoraMinuto(data); + var dateTime = UtilData.obterDateTimeHoraMinuto(data); expect(dateTime, DateTime(1970, 01, 01, 23, 41, 00)); }); });