mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
- Added all source code.
This commit is contained in:
parent
7f8fc1182d
commit
b5be083d88
27 changed files with 7842 additions and 0 deletions
60
src/Date.h
Normal file
60
src/Date.h
Normal file
|
@ -0,0 +1,60 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright 2005 - 2008, Paul Beckingham. All rights reserved.
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef INCLUDED_DATE
|
||||
#define INCLUDED_DATE
|
||||
|
||||
#include <string>
|
||||
|
||||
class Date;
|
||||
|
||||
class Date
|
||||
{
|
||||
public:
|
||||
Date ();
|
||||
Date (time_t);
|
||||
Date (const int, const int, const int);
|
||||
Date (const std::string&);
|
||||
Date (const Date&);
|
||||
virtual ~Date ();
|
||||
|
||||
void toEpoch (time_t&);
|
||||
time_t toEpoch ();
|
||||
void toMDY (int&, int&, int&);
|
||||
void toString (std::string&);
|
||||
std::string toString (void);
|
||||
static bool valid (const int, const int, const int);
|
||||
|
||||
static bool leapYear (int);
|
||||
static int daysInMonth (int, int);
|
||||
static std::string monthName (int);
|
||||
static void dayName (int, std::string&);
|
||||
static std::string dayName (int);
|
||||
int dayOfWeek ();
|
||||
|
||||
int month ();
|
||||
int day ();
|
||||
int year ();
|
||||
|
||||
bool operator== (const Date&);
|
||||
bool operator!= (const Date&);
|
||||
bool operator< (const Date&);
|
||||
bool operator> (const Date&);
|
||||
bool operator<= (const Date&);
|
||||
bool operator>= (const Date&);
|
||||
|
||||
Date operator+ (const int);
|
||||
Date& operator+= (const int);
|
||||
Date& operator-= (const int);
|
||||
|
||||
time_t operator- (const Date&);
|
||||
|
||||
protected:
|
||||
time_t mT;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
Loading…
Add table
Add a link
Reference in a new issue