Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::posix_time::ptime Class Reference

Time type with no timezone or other adjustments. More...

#include <ptime.hpp>

Inheritance diagram for boost::posix_time::ptime:
Collaboration diagram for boost::posix_time::ptime:

Public Types

typedef posix_time_system time_system_type
 
typedef
time_system_type::time_rep_type 
time_rep_type
 
typedef
time_system_type::time_duration_type 
time_duration_type
 
typedef ptime time_type
 
typedef
posix_time_system::date_type 
date_type
 
typedef
posix_time_system::date_duration_type 
date_duration_type
 

Public Member Functions

 ptime (gregorian::date d, time_duration_type td)
 Construct with date and offset in day. More...
 
 ptime (gregorian::date d)
 Construct a time at start of the given day (midnight) More...
 
 ptime (const time_rep_type &rhs)
 Copy from time_rep. More...
 
 ptime (const special_values sv)
 Construct from special value. More...
 
 ptime ()
 
date_type date () const
 
time_duration_type time_of_day () const
 
std::string zone_name (bool=false) const
 Optional bool parameter will return time zone as an offset (ie "+07:00"). More...
 
std::string zone_abbrev (bool=false) const
 Optional bool parameter will return time zone as an offset (ie "+07:00"). More...
 
std::string zone_as_posix_string () const
 An empty string is returned for classes that do not use a time_zone. More...
 
bool is_not_a_date_time () const
 check to see if date is not a value More...
 
bool is_infinity () const
 check to see if date is one of the infinity values More...
 
bool is_pos_infinity () const
 check to see if date is greater than all possible dates More...
 
bool is_neg_infinity () const
 check to see if date is greater than all possible dates More...
 
bool is_special () const
 check to see if time is a special value More...
 
bool operator== (const time_type &rhs) const
 Equality operator – others generated by boost::equality_comparable. More...
 
bool operator< (const time_type &rhs) const
 Equality operator – others generated by boost::less_than_comparable. More...
 
time_duration_type operator- (const time_type &rhs) const
 difference between two times More...
 
time_type operator- (const date_duration_type &dd) const
 subtract date durations More...
 
time_type operator- (const time_duration_type &rhs) const
 subtract time durations More...
 
time_type operator+ (const date_duration_type &dd) const
 add date durations More...
 
time_type operator+ (const time_duration_type &td) const
 add time durations More...
 
time_type operator+= (const date_duration_type &dd)
 
time_type operator+= (const time_duration_type &td)
 
time_type operator-= (const date_duration_type &dd)
 
time_type operator-= (const time_duration_type &td)
 

Protected Attributes

time_rep_type time_
 

Detailed Description

Time type with no timezone or other adjustments.

Member Typedef Documentation

Constructor & Destructor Documentation

boost::posix_time::ptime::ptime ( gregorian::date  d,
time_duration_type  td 
)
inline

Construct with date and offset in day.

boost::posix_time::ptime::ptime ( gregorian::date  d)
inlineexplicit

Construct a time at start of the given day (midnight)

boost::posix_time::ptime::ptime ( const time_rep_type rhs)
inline

Copy from time_rep.

boost::posix_time::ptime::ptime ( const special_values  sv)
inline

Construct from special value.

boost::posix_time::ptime::ptime ( )
inline

Member Function Documentation

date_type boost::date_time::base_time< ptime , posix_time_system >::date ( ) const
inlineinherited
bool boost::date_time::base_time< ptime , posix_time_system >::is_infinity ( ) const
inlineinherited

check to see if date is one of the infinity values

bool boost::date_time::base_time< ptime , posix_time_system >::is_neg_infinity ( ) const
inlineinherited

check to see if date is greater than all possible dates

bool boost::date_time::base_time< ptime , posix_time_system >::is_not_a_date_time ( ) const
inlineinherited

check to see if date is not a value

bool boost::date_time::base_time< ptime , posix_time_system >::is_pos_infinity ( ) const
inlineinherited

check to see if date is greater than all possible dates

bool boost::date_time::base_time< ptime , posix_time_system >::is_special ( ) const
inlineinherited

check to see if time is a special value

time_type boost::date_time::base_time< ptime , posix_time_system >::operator+ ( const date_duration_type dd) const
inlineinherited

add date durations

time_type boost::date_time::base_time< ptime , posix_time_system >::operator+ ( const time_duration_type td) const
inlineinherited

add time durations

time_type boost::date_time::base_time< ptime , posix_time_system >::operator+= ( const date_duration_type dd)
inlineinherited
time_type boost::date_time::base_time< ptime , posix_time_system >::operator+= ( const time_duration_type td)
inlineinherited
time_duration_type boost::date_time::base_time< ptime , posix_time_system >::operator- ( const time_type rhs) const
inlineinherited

difference between two times

time_type boost::date_time::base_time< ptime , posix_time_system >::operator- ( const date_duration_type dd) const
inlineinherited

subtract date durations

time_type boost::date_time::base_time< ptime , posix_time_system >::operator- ( const time_duration_type rhs) const
inlineinherited

subtract time durations

time_type boost::date_time::base_time< ptime , posix_time_system >::operator-= ( const date_duration_type dd)
inlineinherited
time_type boost::date_time::base_time< ptime , posix_time_system >::operator-= ( const time_duration_type td)
inlineinherited
bool boost::date_time::base_time< ptime , posix_time_system >::operator< ( const time_type rhs) const
inlineinherited

Equality operator – others generated by boost::less_than_comparable.

bool boost::date_time::base_time< ptime , posix_time_system >::operator== ( const time_type rhs) const
inlineinherited

Equality operator – others generated by boost::equality_comparable.

time_duration_type boost::date_time::base_time< ptime , posix_time_system >::time_of_day ( ) const
inlineinherited
std::string boost::date_time::base_time< ptime , posix_time_system >::zone_abbrev ( bool  = false) const
inlineinherited

Optional bool parameter will return time zone as an offset (ie "+07:00").

Empty string is returned for classes that do not use a time_zone

std::string boost::date_time::base_time< ptime , posix_time_system >::zone_as_posix_string ( ) const
inlineinherited

An empty string is returned for classes that do not use a time_zone.

std::string boost::date_time::base_time< ptime , posix_time_system >::zone_name ( bool  = false) const
inlineinherited

Optional bool parameter will return time zone as an offset (ie "+07:00").

Empty string is returned for classes that do not use a time_zone

Member Data Documentation


The documentation for this class was generated from the following file: