Skip to content

Commit 67162e2

Browse files
committed
1.9.0
1 parent ee2252d commit 67162e2

File tree

7 files changed

+14
-9
lines changed

7 files changed

+14
-9
lines changed

.github/workflows/workflow.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ jobs:
2020
- name: test
2121
run: flutter test --coverage
2222

23-
# Run Codecov
24-
- name: Codecov
23+
- name: codecov
2524
uses: codecov/codecov-action@v3.1.1
2625

2726
- uses: bluefireteam/flutter-gh-pages@v7

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.9.0
2+
- Novos métodos em `UtilData`: obterDateTimeHora e obterDateTimeHoraMinuto.
3+
- Ajustes no worflow.yml
4+
15
## 1.8.1
26
- Atualiza README e `pubspec.yaml`.
37

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ A classe `UtilData` possui métodos que facilitam obter o valor de um objeto `Da
9999
- `UtilData.obterMes`
100100
- `UtilData.obterDia`
101101
- `UtilData.obterDateTime`
102+
- `UtilData.obterDateTimeHora`
103+
- `UtilData.obterDateTimeHoraMinuto`
102104

103105
A classe `UtilBrasilFields` possui métodos que facilitam obter os valores CEP, KM, CPF e CPNJ já formatados:
104106

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ packages:
2121
path: ".."
2222
relative: true
2323
source: path
24-
version: "1.8.1"
24+
version: "1.9.0"
2525
characters:
2626
dependency: transitive
2727
description:

lib/src/util/util_data.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,24 @@ class UtilData {
9393

9494
/// Retorna um objeto [DateTime] de acordo com a data informada.
9595
///
96-
/// Informar a String `data` no formato `DD/MM/AAAA`
96+
/// Informar a string `data` no formato `DD/MM/AAAA`
9797
static DateTime obterDateTime(String data) {
9898
initializeDateFormatting();
9999
return DateFormat.yMd("pt_BR").parse(data);
100100
}
101101

102102
/// Retorna um objeto [DateTime] de acordo com a data informada.
103103
///
104-
/// Informar a String `data` no formato `DD/MM/AAAA HH:MM`
104+
/// Informar a string `data` no formato `DD/MM/AAAA HH:MM`
105105
static DateTime obterDateTimeHora(String data) {
106106
initializeDateFormatting();
107107
return DateFormat.yMd("pt_BR").add_jm().parse(data);
108108
}
109109

110110
/// Retorna um objeto [DateTime] de acordo com a data informada.
111111
///
112-
/// Informar a String `data` no formato `HH:MM`
113-
static DateTime obterHoraMinuto(String data) {
112+
/// Informar a string `data` no formato `HH:MM`
113+
static DateTime obterDateTimeHoraMinuto(String data) {
114114
initializeDateFormatting();
115115
return DateFormat.jm("pt_BR").parse(data);
116116
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: brasil_fields
22
description: O jeito mais fácil de utilizar padrões e formatos brasileiros em seu projeto Dart.
3-
version: 1.8.1
3+
version: 1.9.0
44
homepage: https://github.com/flutterbootcamp/brasil_fields
55
repository: https://github.com/flutterbootcamp/brasil_fields
66
issue_tracker: https://github.com/flutterbootcamp/brasil_fields/issues

test/util_brasil_fields_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ void main() {
215215

216216
test('31/12/2022 23:41:06', () {
217217
const data = '23:41';
218-
var dateTime = UtilData.obterHoraMinuto(data);
218+
var dateTime = UtilData.obterDateTimeHoraMinuto(data);
219219
expect(dateTime, DateTime(1970, 01, 01, 23, 41, 00));
220220
});
221221
});

0 commit comments

Comments
 (0)