Created
August 18, 2023 15:25
-
-
Save j05u3/fa8ddd3b2060b302a55fec21a386076d to your computer and use it in GitHub Desktop.
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() { | |
final DateTime fechaActual = DateTime.now(); | |
for (var i = 17; i <= 20; i ++) { | |
final DateTime fechaInicioRetos = DateTime(2023, 8, i); | |
final int diferenciaDias = fechaActual.difference(fechaInicioRetos).inDays; | |
print(diferenciaDias.toString()); | |
} | |
// Ouput when run on August 18th 10am: | |
// 1 | |
// 0 | |
// 0 | |
// -1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment