2024-02-04 12:57:23 +00:00
|
|
|
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;
|
|
|
|
}
|
2024-07-27 12:06:56 +00:00
|
|
|
|
|
|
|
String capitalize(String s) => s[0].toUpperCase() + s.substring(1);
|
2024-02-04 12:57:23 +00:00
|
|
|
}
|