Date Processing
- Dates now support 'j' and 'J' julian day format.
This commit is contained in:
14
src/Date.cpp
14
src/Date.cpp
@@ -537,6 +537,20 @@ bool Date::valid (const int m, const int d, const int y)
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Julian
|
||||
bool Date::valid (const int d, const int y)
|
||||
{
|
||||
// Check that the year is valid.
|
||||
if (y < 0)
|
||||
return false;
|
||||
|
||||
if (d < 0 || d > 365)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Date::leapYear (int year)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user