Skip to content

Instantly share code, notes, and snippets.

View date_subtract.dart
void main() {
final newDate = DateTime.now();
print(newDate);
print(newDate.subtract(Duration(hours: newDate.hour, minutes: newDate.minute, seconds: newDate.second, milliseconds: newDate.millisecond, microseconds: newDate.microsecond)));
}
You can’t perform that action at this time.