mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
connecting apis and changes the table design to match figma
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
String formatDateTime(DateTime? dateTime) {
|
||||
@ -9,3 +10,17 @@ String formatDateTime(DateTime? dateTime) {
|
||||
|
||||
return '${dateFormatter.format(dateTime)} ${timeFormatter.format(dateTime)}';
|
||||
}
|
||||
|
||||
String formatTimeOfDayToISO(TimeOfDay time, {DateTime? currentDate}) {
|
||||
final now = currentDate ?? DateTime.now();
|
||||
|
||||
final dateTime = DateTime(
|
||||
now.year,
|
||||
now.month,
|
||||
now.day,
|
||||
time.hour,
|
||||
time.minute,
|
||||
);
|
||||
|
||||
return dateTime.toUtc().toIso8601String();
|
||||
}
|
Reference in New Issue
Block a user