flutter datetime add day

131

import 'package:intl/intl.dart';

DateTime now = DateTime.now();
String formattedDate = DateFormat('yyyy-MM-dd – kk:mm').format(now);
var today = new DateTime.now();
var fiftyDaysFromNow = today.add(new Duration(hours: 1));
var date = DateTime.now();
var newDate = DateTime(date.year, date.month - 1, date.day);

Comments

Submit
0 Comments