mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
ISO8601d: Added ::month
This commit is contained in:
parent
d351c9faf2
commit
24ff570427
2 changed files with 9 additions and 0 deletions
|
@ -906,6 +906,13 @@ int ISO8601d::length (const std::string& format)
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
int ISO8601d::month () const
|
||||||
|
{
|
||||||
|
struct tm* t = localtime (&_date);
|
||||||
|
return t->tm_mon + 1;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void ISO8601p::clear ()
|
void ISO8601p::clear ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,6 +53,8 @@ public:
|
||||||
|
|
||||||
static int length (const std::string&);
|
static int length (const std::string&);
|
||||||
|
|
||||||
|
int month () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void clear ();
|
void clear ();
|
||||||
bool parse_date_time (Nibbler&);
|
bool parse_date_time (Nibbler&);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue