WXP::DateVal Class Reference
[Data objects]

This structure defines basic date values. More...

#include "../include/DateVal.h"

Inheritance diagram for WXP::DateVal:
WXP::Date

List of all members.

Public Member Functions

int init ()
 DateVal ()
int validate ()
long computeSecs ()
int set (int ryear, int rmonth, int rday, int rhour, int rmin, float rsec)
int setYear (int val)
int getYear ()
int setMonth (int val)
int getMonth ()
int setDay (int val)
int getDay ()
int setHour (int val)
int getHour ()
int setMinute (int val)
int getMinute ()
int setSecond (float val)
float getSecond ()
int print ()

Public Attributes

int year
int month
int day
int hour
int min
float sec

Static Public Attributes

static int num_day [13] = { 0,31,59,90,120,151,181,212,243,273,304,334,365 }
static int num_day_leap [13] = { 0,31,60,91,121,152,182,213,244,274,305,335,366 }

Detailed Description

This structure defines basic date values.

Author:
Dan Vietor

Constructor & Destructor Documentation

DateVal::DateVal (  ) 

Constructor. Initializes values

References init().


Member Function Documentation

long DateVal::computeSecs (  ) 

Computes total seconds since 1/1/1970

References day, hour, min, WXP::Const::MISS, month, sec, validate(), and year.

Referenced by WXP::GribFile::readPDS().

int DateVal::init (  ) 

Initializes values

Reimplemented in WXP::Date.

References day, hour, min, WXP::Const::MISS, month, sec, and year.

Referenced by DateVal(), WXP::RcmFile::decode(), and WXP::NameConv::encode().

int DateVal::print (  ) 

Prints date values to stdout.

Reimplemented in WXP::Date.

References day, hour, min, WXP::Const::MISS, month, sec, and year.

int DateVal::set ( int  ryear,
int  rmonth,
int  rday,
int  rhour,
int  rmin,
float  rsec 
)

Sets all values

Parameters:
ryear The year (yyyy or 1900+yyy)
rmonth The month (1-12)
rday The day (1-31)
rhour The hour (0-23)
rmin The minute (0-59)
rsec The second (0-59.99999)

Reimplemented in WXP::Date.

References day, hour, min, month, sec, and year.

Referenced by WXP::NameConv::setLatest().

int DateVal::validate (  ) 

Validates all values. Checks for out of range and resets to base value if invalid.

References day, hour, min, WXP::Const::MISS, month, sec, and year.

Referenced by WXP::Date::adjustHour(), computeSecs(), WXP::Date::set(), and WXP::Date::setTime().


Member Data Documentation

int DateVal::num_day = { 0,31,59,90,120,151,181,212,243,273,304,334,365 } [static]

Number of days in each month (nonleap)

Referenced by WXP::Date::getDays(), WXP::Date::getJulian(), WXP::Date::setDays(), and WXP::Date::setJulian().

int DateVal::num_day_leap = { 0,31,60,91,121,152,182,213,244,274,305,335,366 } [static]

Number of days in each month (leap)

Referenced by WXP::Date::getJulian(), WXP::Date::setDays(), and WXP::Date::setJulian().


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

Generated on 8 Jan 2010 for WXP C++ Library by  doxygen 1.6.1