Repository: jama5262/jiffy

Issue:
Increase sdk to 2.19.0
**Describe the bug**

Increase sdk to 2.19.0




Fix patch:
diff --git a/lib/src/default_display.dart b/lib/src/default_display.dart
index 417ae79f..747fe7ee 100644
--- a/lib/src/default_display.dart
+++ b/lib/src/default_display.dart
@@ -48,25 +48,25 @@ class DefaultDisplay {
   String yMMMd(DateTime dateTime) => DateFormat.yMMMd().format(dateTime);
 
   String yMMMdjm(DateTime dateTime) =>
-      DateFormat.yMMMd().add_jm().format(dateTime);
+      DateFormat.yMMMd().add_jm().format(dateTime).replaceAll(' ', ' ');
 
   String yMMMEd(DateTime dateTime) => DateFormat.yMMMEd().format(dateTime);
 
   String yMMMEdjm(DateTime dateTime) =>
-      DateFormat.yMMMEd().add_jm().format(dateTime);
+      DateFormat.yMMMEd().add_jm().format(dateTime).replaceAll(' ', ' ');
 
   String yMMMM(DateTime dateTime) => DateFormat.yMMMM().format(dateTime);
 
   String yMMMMd(DateTime dateTime) => DateFormat.yMMMMd().format(dateTime);
 
   String yMMMMdjm(DateTime dateTime) =>
-      DateFormat.yMMMMd().add_jm().format(dateTime);
+      DateFormat.yMMMMd().add_jm().format(dateTime).replaceAll(' ', ' ');
 
   String yMMMMEEEEd(DateTime dateTime) =>
       DateFormat.yMMMMEEEEd().format(dateTime);
 
   String yMMMMEEEEdjm(DateTime dateTime) =>
-      DateFormat.yMMMMEEEEd().add_jm().format(dateTime);
+      DateFormat.yMMMMEEEEd().add_jm().format(dateTime).replaceAll(' ', ' ');
 
   String yQQQ(DateTime dateTime) => DateFormat.yQQQ().format(dateTime);
 
@@ -80,9 +80,12 @@ class DefaultDisplay {
   // ignore: non_constant_identifier_names
   String Hms(DateTime dateTime) => DateFormat.Hms().format(dateTime);
 
-  String j(DateTime dateTime) => DateFormat.j().format(dateTime);
+  String j(DateTime dateTime) =>
+      DateFormat.j().format(dateTime).replaceAll(' ', ' ');
 
-  String jm(DateTime dateTime) => DateFormat.jm().format(dateTime);
+  String jm(DateTime dateTime) =>
+      DateFormat.jm().format(dateTime).replaceAll(' ', ' ');
 
-  String jms(DateTime dateTime) => DateFormat.jms().format(dateTime);
+  String jms(DateTime dateTime) =>
+      DateFormat.jms().format(dateTime).replaceAll(' ', ' ');
 }
diff --git a/lib/src/display.dart b/lib/src/display.dart
index 1fe40a78..fa76425d 100644
--- a/lib/src/display.dart
+++ b/lib/src/display.dart
@@ -21,17 +21,11 @@ class Display {
       throw JiffyException('The provided pattern for datetime `$dateTime` '
           'cannot be blank');
     }
-    try {
-      final escapedPattern = _replaceEscapePattern(pattern);
-      final localeOrdinal = _getLocaleOrdinal(locale, _getter.date(dateTime));
-      final newPattern =
-          _replaceLocaleOrdinalDatePattern(escapedPattern, localeOrdinal);
-      return DateFormat(newPattern).format(dateTime);
-    } catch (error, stackTrace) {
-      throw JiffyException('The pattern `$pattern` might be invalid: \n'
-          'Error: $error'
-          'Stack Trace: $stackTrace');
-    }
+    final escapedPattern = _replaceEscapePattern(pattern);
+    final localeOrdinal = _getLocaleOrdinal(locale, _getter.date(dateTime));
+    final newPattern =
+        _replaceLocaleOrdinalDatePattern(escapedPattern, localeOrdinal);
+    return DateFormat(newPattern).format(dateTime);
   }
 
   String fromAsRelativeDateTime(DateTime firstDateTime, DateTime secondDateTime,
diff --git a/pubspec.yaml b/pubspec.yaml
index 50e12dfc..22a98778 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -7,7 +7,7 @@ issue_tracker: https://github.com/jama5262/jiffy/issues
 documentation: https://github.com/jama5262/jiffy/tree/master/doc
 
 environment:
-  sdk: '>=2.15.0 <3.0.0'
+  sdk: '>=2.19.0 <4.0.0'
 
 dependencies:
   intl: ^0.18.0


Test patch:
diff --git a/test/src/display_test.dart b/test/src/display_test.dart
index 65f38767..7b564d67 100644
--- a/test/src/display_test.dart
+++ b/test/src/display_test.dart
@@ -86,22 +86,6 @@ void main() {
           throwsA(isA<JiffyException>().having((e) => e.toString(), 'message',
               contains(expectedExceptionMessage))));
     });
-
-    test('Should throw JiffyException if provided pattern is invalid', () {
-      // Setup
-      final dateTime = DateTime(1997, 9, 23, 12, 11, 22, 123, 456);
-      final pattern = 'invalid-pattern';
-      final locale = EnLocale();
-
-      final expectedExceptionMessage =
-          'The pattern `$pattern` might be invalid';
-
-      // Execute and Verify
-      expect(
-          () => underTest.format(dateTime, pattern, locale),
-          throwsA(isA<JiffyException>().having((e) => e.toString(), 'message',
-              contains(expectedExceptionMessage))));
-    });
   });
 
   group('Test from as relative between two datetime', () {