WXP C++ Library Version 6.74.9
|
This struct defines basic date values. More...
#include "../include/DateVal.h"
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 } |
This struct defines basic date values.
DateVal::DateVal | ( | ) |
Constructor. Initializes values
References init().
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().
|
inline |
Gets the day
References day.
|
inline |
Gets the hour
References hour.
|
inline |
Gets the minute
References min.
|
inline |
Gets the month
References month.
|
inline |
Gets the second
References sec.
|
inline |
Gets the year
References year.
int DateVal::init | ( | ) |
Initializes values
References day, hour, min, WXP::Const::MISS, month, sec, and year.
Referenced by DateVal(), WXP::RcmFile::decode(), WXP::NameConv::encode(), and WXP::Date::init().
int DateVal::print | ( | ) |
int DateVal::set | ( | int | ryear, |
int | rmonth, | ||
int | rday, | ||
int | rhour, | ||
int | rmin, | ||
float | rsec | ||
) |
|
inline |
Sets the day
References day.
|
inline |
Sets the hour
References hour.
|
inline |
Sets the minute
References min.
|
inline |
Sets the month
References month.
|
inline |
Sets the second
References sec.
|
inline |
Sets the year
References year.
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(), WXP::Date::adjustHour(), WXP::Date::adjustHour(), computeSecs(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), and WXP::Date::setTime().
int WXP::DateVal::day |
Day of month 1-31
Referenced by WXP::Date::addDays(), WXP::Date::addHours(), WXP::Date::addMinutes(), WXP::Date::addSeconds(), WXP::Date::adjustHour(), WXP::Date::changeTimezone(), computeSecs(), WXP::NameConv::decode(), WXP::Vtec::decode(), WXP::DateTool::decode(), WXP::RcmFile::decode(), WXP::MosFile::decodeGFS(), WXP::MosFile::decodeGFSX(), WXP::MosFile::decodeLAMP(), WXP::MosFile::decodeNAM(), WXP::MosFile::decodeNGM(), WXP::NameConv::encode(), WXP::Gvar::epochTime(), WXP::Gvar::epochTime(), WXP::Date::fix(), WXP::Date::get(), WXP::Date::getDay(), getDay(), WXP::Date::getDays(), WXP::AreaFile::getImageDate(), WXP::Date::getJulian(), WXP::DateTool::getSeconds(), WXP::Date::getVals(), init(), WXP::Date::print(), print(), WXP::LightFile::read(), WXP::MosUFile::read(), WXP::WatchFile::read(), WXP::AreaFile::readHeader(), WXP::KavradFile::readHeader(), WXP::NowradFile::readHeader(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::GribFile::readIDS(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), set(), WXP::Date::set(), WXP::WmoIngest::setAction(), WXP::Date::setDay(), setDay(), WXP::Date::setDays(), WXP::NameConv::setFixDate(), WXP::Date::setJulian(), WXP::Date::setJulian(), WXP::NameConv::setLatest(), WXP::Date::toText(), and validate().
int WXP::DateVal::hour |
Hour of day GMT 0-23
Referenced by WXP::Date::addDays(), WXP::Date::addHours(), WXP::Date::addMinutes(), WXP::Date::addSeconds(), WXP::Date::adjustHour(), WXP::Date::adjustHour(), WXP::Date::changeTimezone(), computeSecs(), WXP::NameConv::decode(), WXP::Vtec::decode(), WXP::DateTool::decode(), WXP::RcmFile::decode(), WXP::MosFile::decodeGFS(), WXP::MosFile::decodeGFSX(), WXP::MosFile::decodeLAMP(), WXP::MosFile::decodeNAM(), WXP::MosFile::decodeNGM(), WXP::NameConv::encode(), WXP::Gvar::epochTime(), WXP::Gvar::epochTime(), WXP::Date::get(), WXP::Date::getHour(), getHour(), WXP::AreaFile::getImageDate(), WXP::DateTool::getSeconds(), WXP::Date::getVals(), init(), WXP::GribFile::makeDatim(), WXP::Date::print(), print(), WXP::LightFile::read(), WXP::MosUFile::read(), WXP::WatchFile::read(), WXP::AreaFile::readHeader(), WXP::KavradFile::readHeader(), WXP::NowradFile::readHeader(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::GribFile::readIDS(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), set(), WXP::Date::set(), WXP::WmoIngest::setAction(), WXP::NameConv::setFixDate(), WXP::Date::setHour(), setHour(), WXP::NameConv::setLatest(), WXP::Date::setTime(), WXP::Date::setTime(), WXP::Date::toText(), WXP::Date::toText(), and validate().
int WXP::DateVal::min |
Minute
Referenced by WXP::Date::addDays(), WXP::Date::addHours(), WXP::Date::addMinutes(), WXP::Date::addSeconds(), WXP::Date::changeTimezone(), computeSecs(), WXP::NameConv::decode(), WXP::Vtec::decode(), WXP::DateTool::decode(), WXP::RcmFile::decode(), WXP::NameConv::encode(), WXP::Gvar::epochTime(), WXP::Gvar::epochTime(), WXP::Date::fix(), WXP::Date::get(), WXP::AreaFile::getImageDate(), WXP::Date::getMinute(), getMinute(), WXP::DateTool::getSeconds(), WXP::Date::getVals(), init(), WXP::GribFile::open(), WXP::Date::print(), print(), WXP::LightFile::read(), WXP::WatchFile::read(), WXP::AreaFile::readHeader(), WXP::KavradFile::readHeader(), WXP::NowradFile::readHeader(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::GribFile::readIDS(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), set(), WXP::Date::set(), WXP::WmoIngest::setAction(), WXP::NameConv::setFixDate(), WXP::NameConv::setLatest(), WXP::Date::setMinute(), setMinute(), WXP::Date::setTime(), WXP::Date::setTime(), WXP::Date::toText(), WXP::Date::toText(), and validate().
int WXP::DateVal::month |
Month 1-12
Referenced by WXP::Date::addMonths(), WXP::Date::adjustHour(), computeSecs(), WXP::NameConv::decode(), WXP::Vtec::decode(), WXP::DateTool::decode(), WXP::RcmFile::decode(), WXP::MosFile::decodeGFS(), WXP::MosFile::decodeGFSX(), WXP::MosFile::decodeLAMP(), WXP::MosFile::decodeNAM(), WXP::MosFile::decodeNGM(), WXP::NameConv::encode(), WXP::Date::fix(), WXP::Date::get(), WXP::Date::getDays(), WXP::Date::getJulian(), WXP::Date::getMonth(), getMonth(), WXP::DateTool::getSeconds(), WXP::Date::getVals(), init(), WXP::Date::print(), print(), WXP::LightFile::read(), WXP::MosUFile::read(), WXP::KavradFile::readHeader(), WXP::NowradFile::readHeader(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::GribFile::readIDS(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), set(), WXP::Date::set(), WXP::WmoIngest::setAction(), WXP::Date::setDays(), WXP::NameConv::setFixDate(), WXP::Date::setJulian(), WXP::Date::setJulian(), WXP::NameConv::setLatest(), WXP::Date::setMonth(), setMonth(), WXP::Date::toText(), and validate().
|
static |
Number of days in each month (nonleap)
Referenced by WXP::Date::getDays(), WXP::Date::getJulian(), WXP::Date::setDays(), and WXP::Date::setJulian().
|
static |
Number of days in each month (leap)
Referenced by WXP::Date::getJulian(), WXP::Date::setDays(), and WXP::Date::setJulian().
float WXP::DateVal::sec |
Second
Referenced by WXP::Date::addDays(), WXP::Date::addHours(), WXP::Date::addMinutes(), WXP::Date::addSeconds(), WXP::Date::changeTimezone(), computeSecs(), WXP::DateTool::decode(), WXP::Gvar::epochTime(), WXP::Gvar::epochTime(), WXP::Date::fix(), WXP::Date::get(), WXP::AreaFile::getImageDate(), WXP::Date::getSecond(), getSecond(), WXP::Date::getVals(), init(), WXP::GribFile::open(), WXP::Date::print(), print(), WXP::LightFile::read(), WXP::AreaFile::readHeader(), WXP::KavradFile::readHeader(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::GribFile::readIDS(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), set(), WXP::Date::set(), WXP::Date::setFractionalSecond(), WXP::NameConv::setLatest(), WXP::Date::setSecond(), setSecond(), WXP::Date::setTime(), WXP::Date::setTime(), WXP::Date::toText(), WXP::Date::toText(), and validate().
int WXP::DateVal::year |
Year
Referenced by WXP::Date::addMonths(), WXP::Date::addYears(), WXP::Date::adjustHour(), computeSecs(), WXP::NameConv::decode(), WXP::Vtec::decode(), WXP::DateTool::decode(), WXP::RcmFile::decode(), WXP::MosFile::decodeGFS(), WXP::MosFile::decodeGFSX(), WXP::MosFile::decodeLAMP(), WXP::MosFile::decodeNAM(), WXP::MosFile::decodeNGM(), WXP::NameConv::encode(), WXP::Gvar::epochTime(), WXP::Gvar::epochTime(), WXP::Date::fix(), WXP::Date::get(), WXP::Date::getDays(), WXP::AreaFile::getImageDate(), WXP::Date::getJulian(), WXP::DateTool::getSeconds(), WXP::Date::getVals(), WXP::Date::getYear(), getYear(), WXP::Date::getYear00(), init(), WXP::Date::isLeap(), WXP::Date::isYearLeap(), WXP::Date::print(), print(), WXP::LightFile::read(), WXP::MosUFile::read(), WXP::AreaFile::readHeader(), WXP::KavradFile::readHeader(), WXP::NowradFile::readHeader(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::GribFile::readIDS(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), WXP::Date::set(), set(), WXP::Date::set(), WXP::WmoIngest::setAction(), WXP::Date::setDays(), WXP::NameConv::setFixDate(), WXP::Date::setJulian(), WXP::Date::setJulian(), WXP::NameConv::setLatest(), WXP::Date::setYear(), setYear(), WXP::Date::toText(), and validate().