Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

how to format a date in Dart

import 'package:intl/intl.dart';

main() {
  final DateTime now = DateTime.now();
  final DateFormat formatter = DateFormat('yyyy-MM-dd');
  final String formatted = formatter.format(now);
  print(formatted); // something like 2013-04-20
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #format #date #Dart
ADD COMMENT
Topic
Name
1+3 =