summaryrefslogtreecommitdiff
path: root/lib/utils.dart
blob: 79bee4e772a2785806f6d47e5d38d78c5586b5ff (plain)
1
2
3
4
5
int daysBetween(DateTime from, DateTime to) {
  from = DateTime(from.year, from.month, from.day);
  to = DateTime(to.year, to.month, to.day);
  return (to.difference(from).inHours / 24).round();
}