ISO8601d: Added ::toEpoch
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
time_t ISO8601d::toEpoch ()
|
||||||
|
{
|
||||||
|
return _date;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
std::string ISO8601d::toEpochString ()
|
std::string ISO8601d::toEpochString ()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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 = "");
|
||||||
|
|
||||||
|
time_t toEpoch ();
|
||||||
std::string toEpochString ();
|
std::string toEpochString ();
|
||||||
double toJulian ();
|
double toJulian ();
|
||||||
void toMDY (int&, int&, int&);
|
void toMDY (int&, int&, int&);
|
||||||
|
|||||||
Reference in New Issue
Block a user