mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
ISO8601d: Added ::hour, ::minute, ::second
This commit is contained in:
parent
5ed0d13194
commit
7164215146
2 changed files with 24 additions and 0 deletions
|
@ -968,6 +968,27 @@ int ISO8601d::dayOfYear () const
|
||||||
return t->tm_yday + 1;
|
return t->tm_yday + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
int ISO8601d::hour () const
|
||||||
|
{
|
||||||
|
struct tm* t = localtime (&_date);
|
||||||
|
return t->tm_hour;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
int ISO8601d::minute () const
|
||||||
|
{
|
||||||
|
struct tm* t = localtime (&_date);
|
||||||
|
return t->tm_min;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
int ISO8601d::second () const
|
||||||
|
{
|
||||||
|
struct tm* t = localtime (&_date);
|
||||||
|
return t->tm_sec;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void ISO8601p::clear ()
|
void ISO8601p::clear ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,6 +60,9 @@ public:
|
||||||
int weekOfYear (int) const;
|
int weekOfYear (int) const;
|
||||||
int dayOfWeek () const;
|
int dayOfWeek () const;
|
||||||
int dayOfYear () const;
|
int dayOfYear () const;
|
||||||
|
int hour () const;
|
||||||
|
int minute () const;
|
||||||
|
int second () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void clear ();
|
void clear ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue