Skip to content

Commit

Permalink
FIXED analysis issues
Browse files Browse the repository at this point in the history
  • Loading branch information
FatulM committed Jun 30, 2024
1 parent adda8aa commit ff8d58b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/src/date_formatter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ abstract class DateFormatter {
case 4:
return str;
case 3:
return '0' + str;
return '0$str';
case 2:
return '00' + str;
return '00$str';
case 1:
return '000' + str;
return '000$str';
default: // case: 0
return '0000';
}
Expand All @@ -70,7 +70,7 @@ abstract class DateFormatter {
}

final String str = (year % 100).toString();
return str.length == 1 ? '0' + str : str;
return str.length == 1 ? '0$str' : str;
}

/// month number string whatever length it has
Expand All @@ -81,7 +81,7 @@ abstract class DateFormatter {
/// month number string ensured to have length of 2
String get mm {
final String str = m;
return str.length == 1 ? '0' + str : str;
return str.length == 1 ? '0$str' : str;
}

/// month name
Expand All @@ -95,7 +95,7 @@ abstract class DateFormatter {
/// day number string ensured to have length of 2
String get dd {
final String str = d;
return str.length == 1 ? '0' + str : str;
return str.length == 1 ? '0$str' : str;
}

/// week day name
Expand Down

0 comments on commit ff8d58b

Please sign in to comment.