mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Some code changes for optimization
This commit is contained in:
@ -28,14 +28,14 @@ int GetYearDay(int year, int month, int day)
|
||||
int yearDay = 0;
|
||||
UINT dates[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
|
||||
for (int i = 0; i < month - 1; i++)
|
||||
for (int i = 0; i < month - 1; ++i)
|
||||
{
|
||||
yearDay += dates[i];
|
||||
}
|
||||
|
||||
if (month > 2 && ((((year % 4) == 0) && ((year % 100) != 0)) || (year % 400) == 0))
|
||||
{
|
||||
yearDay++;
|
||||
++yearDay;
|
||||
}
|
||||
|
||||
yearDay += day;
|
||||
|
Reference in New Issue
Block a user