27class EXPCL_PANDA_DOWNLOADER HTTPDate {
30 INLINE HTTPDate(time_t time);
31 HTTPDate(
const std::string &format);
32 INLINE HTTPDate(
const HTTPDate ©);
33 INLINE
void operator = (
const HTTPDate ©);
34 INLINE
static HTTPDate
now();
38 std::string get_string()
const;
41 INLINE
bool operator == (
const HTTPDate &other)
const;
42 INLINE
bool operator != (
const HTTPDate &other)
const;
43 INLINE
bool operator < (
const HTTPDate &other)
const;
44 INLINE
bool operator > (
const HTTPDate &other)
const;
45 INLINE
int compare_to(
const HTTPDate &other)
const;
47 INLINE
void operator += (
int seconds);
48 INLINE
void operator -= (
int seconds);
50 INLINE HTTPDate operator + (
int seconds)
const;
51 INLINE HTTPDate operator - (
int seconds)
const;
52 INLINE
int operator - (
const HTTPDate &other)
const;
54 bool input(std::istream &in);
55 void output(std::ostream &out)
const;
58 static std::string get_token(
const std::string &str,
size_t &pos);
63INLINE std::istream &operator >> (std::istream &in,
HTTPDate &date);
64INLINE std::ostream &operator << (std::ostream &out,
const HTTPDate &date);
A container for an HTTP-legal time/date indication.
int compare_to(const HTTPDate &other) const
Returns a number less than zero if this HTTPDate sorts before the other one, greater than zero if it ...
static HTTPDate now()
Returns an HTTPDate that represents the current time and date.
time_t get_time() const
Returns the date as a C time_t value.
bool is_valid() const
Returns true if the date is meaningful, or false if it is -1 (which generally indicates the source st...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.