Skip to content

Instantly share code, notes, and snippets.

@luizjacomn
Created March 1, 2021 16:11
Show Gist options
  • Save luizjacomn/c63a267b5abc55542e721fa9f4305124 to your computer and use it in GitHub Desktop.
Save luizjacomn/c63a267b5abc55542e721fa9f4305124 to your computer and use it in GitHub Desktop.
Difference between two dates, in days
void main() {
var d1 = DateTime(2021, 2, 4);
var d2 = DateTime.now();
print(d2.difference(d1).inDays);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment