Answers for "flutter datetime add month"

24

flutter convert datetime in day of month

import 'package:intl/intl.dart';

DateTime now = DateTime.now();
String formattedDate = DateFormat('yyyy-MM-dd – kk:mm').format(now);
Posted by: Guest on September-10-2020
0

flutter get number of days in month

DateTime now = new DateTime.now();
DateTime lastDayOfMonth = new DateTime(now.year, now.month + 1, 0);
print("${lastDayOfMonth.month}/${lastDayOfMonth.day}");
Posted by: Guest on June-10-2021
0

flutter datetime add month

var date = DateTime.now();
var newDate = DateTime(date.year, date.month - 1, date.day);
Posted by: Guest on May-17-2022

Code answers related to "Dart"

Browse Popular Code Answers by Language