Started work on a calculator 'lib' that the app is going to use

This commit is contained in:
broodjeaap 2020-06-13 14:27:52 +02:00
parent 74f09d84cd
commit d8805322d2

10
lib/DayCalculator.dart Normal file
View file

@ -0,0 +1,10 @@
// Based on this article:
// https://artofmemory.com/blog/how-to-calculate-the-day-of-the-week-4203.html
class DayCalculator {
// Calculates (YY + floor(YY / 4)) % 7
static int getYearValue(int year){
var yy = year % 100;
return (yy + (yy / 4).floor()) % 7;
}
}