C++/Tree Mapping Runtime Library
List of all members
time_zone Class Reference

Time zone representation. More...

#include <date-time.hxx>

Inheritance diagram for time_zone:
date< C, B > date_time< C, B > gday< C, B > gmonth< C, B > gmonth_day< C, B > gyear< C, B > gyear_month< C, B > time< C, B >

Constructors

 time_zone ()
 Default constructor.
 
 time_zone (short hours, short minutes)
 Initialize an instance with the hours and minutes components.
 
bool zone_present () const
 Determine if time zone is specified.
 
void zone_reset ()
 Reset the time zone to the 'not specified' state.
 
short zone_hours () const
 Get the hours component of the time zone.
 
void zone_hours (short h)
 Set the hours component of the time zone.
 
short zone_minutes () const
 Get the minutes component of the time zone.
 
void zone_minutes (short m)
 Set the minutes component of the time zone.
 

Detailed Description

Time zone representation.

The time_zone class represents an optional time zone and is used as a base class for date/time types.

The time zone can negative in which case both the hours and minutes components should be negative.

Constructor & Destructor Documentation

◆ time_zone() [1/2]

time_zone ( )

Default constructor.

This constructor initializes the instance to the 'not specified' state.

◆ time_zone() [2/2]

time_zone ( short  hours,
short  minutes 
)

Initialize an instance with the hours and minutes components.

Parameters
hoursThe time zone hours component.
minutesThe time zone minutes component.

Member Function Documentation

◆ zone_present()

bool zone_present ( ) const

Determine if time zone is specified.

Returns
True if time zone is specified, false otherwise.

◆ zone_hours() [1/2]

short zone_hours ( ) const

Get the hours component of the time zone.

Returns
The hours component of the time zone.

◆ zone_hours() [2/2]

void zone_hours ( short  h)

Set the hours component of the time zone.

Parameters
hThe new hours component.

◆ zone_minutes() [1/2]

short zone_minutes ( ) const

Get the minutes component of the time zone.

Returns
The minutes component of the time zone.

◆ zone_minutes() [2/2]

void zone_minutes ( short  m)

Set the minutes component of the time zone.

Parameters
mThe new minutes component.

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

Copyright © 2005-2023 Code Synthesis.