mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
ISO8601d: Added ::toJulian
This commit is contained in:
parent
7a5025e64d
commit
c0bc6059ca
2 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue