Last active
July 24, 2020 08:46
-
-
Save misterfourtytwo/d918c83e1af4b53d7416878b701b8b97 to your computer and use it in GitHub Desktop.
dateTime difference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
// subtract later date from previous for positive values | |
DateTime a = DateTime(0, 1); | |
DateTime b = DateTime(0, 2); | |
print(b.difference(a).inDays); | |
print(a.difference(b).inDays); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment