Skip to content

Commit

Permalink
fix: replace usage of intl package with custom logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Desu Sai Venkat committed May 17, 2023
1 parent 8146a07 commit 5e94121
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 8 additions & 3 deletions packages/plugins/rudder_plugin_interface/lib/src/utils.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'package:intl/intl.dart';

class Utils {
// range constants
static const int MIN_CONFIG_REFRESH_INTERVAL = 1;
Expand All @@ -19,7 +17,14 @@ class Utils {
}

static String toDateString(DateTime dateTime) {
return DateFormat("yy-MM-dd").format(dateTime);
return "${dateTime.year % 100}-${_twoDigits(dateTime.month)}-${_twoDigits(dateTime.day)}";
}

static String _twoDigits(int n) {
if (n >= 10) {
return "$n";
}
return "0$n";
}

static bool equalsIgnoreCase(String string1, String string2) {
Expand Down
1 change: 0 additions & 1 deletion packages/plugins/rudder_plugin_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ dependencies:
flutter:
sdk: flutter
logger: ^1.0.0
intl: ^0.17.0
flutter_dotenv: ^5.0.2
plugin_platform_interface: ^2.0.0

Expand Down

0 comments on commit 5e94121

Please sign in to comment.