mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Date: Removed unused ::easter method
- It is duplicated in Dates.cpp.
This commit is contained in:
parent
227163a4a1
commit
71e2f1bf2f
3 changed files with 1 additions and 46 deletions
26
src/Date.cpp
26
src/Date.cpp
|
@ -573,32 +573,6 @@ int Date::length (const std::string& format)
|
|||
return total;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
time_t Date::easter (int year)
|
||||
{
|
||||
int Y = year;
|
||||
int a = Y % 19;
|
||||
int b = Y / 100;
|
||||
int c = Y % 100;
|
||||
int d = b / 4;
|
||||
int e = b % 4;
|
||||
int f = (b + 8) / 25;
|
||||
int g = (b - f + 1) / 3;
|
||||
int h = (19 * a + b - d - g + 15) % 30;
|
||||
int i = c / 4;
|
||||
int k = c % 4;
|
||||
int L = (32 + 2 * e + 2 * i - h - k) % 7;
|
||||
int m = (a + 11 * h + 22 * L) / 451;
|
||||
int month = (h + L - 7 * m + 114) / 31;
|
||||
int day = ((h + L - 7 * m + 114) % 31) + 1;
|
||||
struct tm t = {0};
|
||||
t.tm_isdst = -1; // Requests that mktime determine summer time effect.
|
||||
t.tm_mday = day;
|
||||
t.tm_mon = month - 1;
|
||||
t.tm_year = year - 1900;
|
||||
return mktime (&t);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Date::month () const
|
||||
{
|
||||
|
|
|
@ -70,7 +70,6 @@ public:
|
|||
static bool valid (const int, const int, const int);
|
||||
static bool valid (const int, const int);
|
||||
|
||||
static time_t easter (int year);
|
||||
static bool leapYear (int);
|
||||
static int daysInMonth (int, int);
|
||||
static int daysInYear (int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue