Open bagusandrewijaya opened 1 year ago
If you look at the test examples at https://github.com/prayer-timetable/adhan_dart/blob/master/test/test.dart you will see the line
DateTime date = tz.TZDateTime.from(DateTime.now(), location);
... that gives you prayer times, etc, for the current date (today, in this case).
You can use something like this for yesterday:
DateTime date = tz.TZDateTime.from(DateTime.now().subtract(Duration(days: 1)), location);
A day before yesterday:
DateTime date = tz.TZDateTime.from(DateTime.now().subtract(Duration(days: 2)), location);
Specific day:
DateTime date = tz.TZDateTime.from(DateTime(2023, 11, 1, 15, 0), location);
You get the idea :-)
If you look at the test examples at https://github.com/prayer-timetable/adhan_dart/blob/master/test/test.dart you will see the line
... that gives you prayer times, etc, for the current date (today, in this case).
You can use something like this for yesterday:
A day before yesterday:
Specific day:
You get the idea :-)