Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions
HTTPDate Class Reference

A container for an HTTP-legal time/date indication. More...

List of all members.

Public Member Functions

 HTTPDate ()
 HTTPDate (HTTPDate const copy)
 HTTPDate (string format)
 Decodes the string into a sensible date.
 HTTPDate (unsigned int time)
int compareTo (HTTPDate const other)
 Returns a number less than zero if this HTTPDate sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.
string getString ()
unsigned int getTime ()
 Returns the date as a C time_t value.
bool input (istream in)
bool isValid ()
 Returns true if the date is meaningful, or false if it is -1 (which generally indicates the source string could not be parsed.)
bool operator!= (HTTPDate const other)
HTTPDate operator+ (int seconds)
HTTPDate operator+= (int seconds)
int operator- (HTTPDate const other)
HTTPDate operator- (int seconds)
HTTPDate operator-= (int seconds)
bool operator< (HTTPDate const other)
HTTPDate operator= (HTTPDate const copy)
bool operator== (HTTPDate const other)
bool operator> (HTTPDate const other)
 output (ostream out)

Static Public Member Functions

static HTTPDate now ()
 Returns an HTTPDate that represents the current time and date.

Detailed Description

A container for an HTTP-legal time/date indication.

This can accept a string from an HTTP header and will decode it into a C time_t value; conversely, it can accept a time_t value and encode it for output as a string.


Constructor & Destructor Documentation

HTTPDate ( )
HTTPDate ( HTTPDate const  copy)
HTTPDate ( string  format)

Decodes the string into a sensible date.

Returns 0 (!is_valid()) if the string cannot be correctly decoded.

HTTPDate ( unsigned int  time)

Member Function Documentation

int compareTo ( HTTPDate const  other)

Returns a number less than zero if this HTTPDate sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.

string getString ( )
unsigned int getTime ( )

Returns the date as a C time_t value.

bool input ( istream  in)
bool isValid ( )

Returns true if the date is meaningful, or false if it is -1 (which generally indicates the source string could not be parsed.)

static HTTPDate now ( ) [static]

Returns an HTTPDate that represents the current time and date.

bool operator!= ( HTTPDate const  other)
HTTPDate operator+ ( int  seconds)
HTTPDate operator+= ( int  seconds)
int operator- ( HTTPDate const  other)
HTTPDate operator- ( int  seconds)
HTTPDate operator-= ( int  seconds)
bool operator< ( HTTPDate const  other)
HTTPDate operator= ( HTTPDate const  copy)
bool operator== ( HTTPDate const  other)
bool operator> ( HTTPDate const  other)
output ( ostream  out)
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties