ISO8601d: Added ::toJulian
This commit is contained in:
@@ -840,6 +840,12 @@ bool ISO8601p::parse (const std::string& input, std::string::size_type& start)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
double ISO8601d::toJulian ()
|
||||||
|
{
|
||||||
|
return (_date / 86400.0) + 2440587.5;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void ISO8601d::toMDY (int& m, int& d, int& y)
|
void ISO8601d::toMDY (int& m, int& d, int& y)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public:
|
|||||||
operator time_t () const;
|
operator time_t () const;
|
||||||
bool parse (const std::string&, std::string::size_type&, const std::string& format = "");
|
bool parse (const std::string&, std::string::size_type&, const std::string& format = "");
|
||||||
|
|
||||||
|
double toJulian ();
|
||||||
void toMDY (int&, int&, int&);
|
void toMDY (int&, int&, int&);
|
||||||
|
|
||||||
ISO8601d startOfDay () const;
|
ISO8601d startOfDay () const;
|
||||||
|
|||||||
Reference in New Issue
Block a user