mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
ISO8601d: Added ::toEpochString
This commit is contained in:
parent
c0bc6059ca
commit
4a33f3e093
2 changed files with 9 additions and 0 deletions
|
@ -840,6 +840,14 @@ bool ISO8601p::parse (const std::string& input, std::string::size_type& start)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
std::string ISO8601d::toEpochString ()
|
||||||
|
{
|
||||||
|
std::stringstream epoch;
|
||||||
|
epoch << _date;
|
||||||
|
return epoch.str ();
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
double ISO8601d::toJulian ()
|
double ISO8601d::toJulian ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -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 = "");
|
||||||
|
|
||||||
|
std::string toEpochString ();
|
||||||
double toJulian ();
|
double toJulian ();
|
||||||
void toMDY (int&, int&, int&);
|
void toMDY (int&, int&, int&);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue