The Webfeed Flutter package for Appeto SDK.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
289 B

  1. import 'package:intl/intl.dart';
  2. var rfc822DateFormat = DateFormat('EEE, dd MMM yyyy HH:mm:ss Z', 'en_US');
  3. DateTime parseDateTime(dateString) {
  4. if (dateString == null) return null;
  5. try {
  6. return rfc822DateFormat.parse(dateString);
  7. } on FormatException {
  8. return null;
  9. }
  10. }