Created
August 30, 2023 14:44
-
-
Save av1v3k/5f88c20eab77f2d9b5ef0870aa6ede97 to your computer and use it in GitHub Desktop.
Time remaining in dart
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() { | |
var to = DateTime(2023, 8, 31, 0, 0); | |
DateTime now = DateTime.now(); | |
var d = now.difference(to); | |
print(to); | |
print(now); | |
var remainingtime = d.abs(); | |
print('$remainingtime'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment