first commit
This commit is contained in:
16
lib/services/other_function.dart
Normal file
16
lib/services/other_function.dart
Normal file
@ -0,0 +1,16 @@
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class MyFunction {
|
||||
String convertDateTime(String input) {
|
||||
DateTime dateTime = DateTime.parse(input);
|
||||
String formattedDateTime =
|
||||
DateFormat('dd-MM-yyyy | hh.mm.ss a').format(dateTime);
|
||||
return formattedDateTime;
|
||||
}
|
||||
|
||||
// chnage | to \n in string
|
||||
String convertDateTime2(String input) {
|
||||
input = input.replaceAll('| ', '\n');
|
||||
return input;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user