asDate property

DateTime asDate

Convert this value to a DateTime or return DateTime.fromMillisecondsSinceEpoch(0) if it is not a DateTime.

Implementation

DateTime get asDate =>
    DateTime.tryParse(value) ?? DateTime.fromMillisecondsSinceEpoch(0);