Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

date now dart

import 'package:intl/intl.dart';
static final DateTime now = DateTime.now();

Want to format?

static final DateFormat formatter = DateFormat('yyyy-MM-dd');
  final String formatted = formatter.format(now);
  
OR

DateTime dateToday = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day) ;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #date #dart
ADD COMMENT
Topic
Name
9+8 =