#include <TimeUnit.h>
Public Member Functions | |
TimeUnit () throw (CDMException) | |
initialize a timeUnit with a unit string | |
TimeUnit (const std::string &timeUnitString) throw (CDMException) | |
virtual | ~TimeUnit () |
double | unitTime2epochSeconds (double unitTime) const |
calculate the epochSeconds for a time in the current unit | |
double | epochSeconds2unitTime (double epochSeconds) const |
calculate the time in the current unit from the epoch | |
FimexTime | unitTime2fimexTime (double unitTime) const throw (CDMException) |
calculate the time in a calendar form | |
double | fimexTime2unitTime (const FimexTime &fiTime) const throw (CDMException) |
calculate the time in the current unit from the calendar form | |
double | fimexTime2unitTimeX (FimexTime fiTime) const throw (CDMException) |
same as fimexTime2unitTime but copying fiTime instead of referencing, needed for i.e. bind1st(mem_fun()) |
All times are assumed to be UTC, and we use the Gregorian Calendar (not 100% true for times before 1600AD, depending on implementation)
MetNoFimex::TimeUnit::TimeUnit | ( | ) | throw (CDMException) |
initialize a timeUnit with a unit string
MetNoFimex::TimeUnit::TimeUnit | ( | const std::string & | timeUnitString | ) | throw (CDMException) |
virtual MetNoFimex::TimeUnit::~TimeUnit | ( | ) | [virtual] |
double MetNoFimex::TimeUnit::unitTime2epochSeconds | ( | double | unitTime | ) | const |
calculate the epochSeconds for a time in the current unit
double MetNoFimex::TimeUnit::epochSeconds2unitTime | ( | double | epochSeconds | ) | const |
calculate the time in the current unit from the epoch
FimexTime MetNoFimex::TimeUnit::unitTime2fimexTime | ( | double | unitTime | ) | const throw (CDMException) |
calculate the time in a calendar form
double MetNoFimex::TimeUnit::fimexTime2unitTime | ( | const FimexTime & | fiTime | ) | const throw (CDMException) |
double MetNoFimex::TimeUnit::fimexTime2unitTimeX | ( | FimexTime | fiTime | ) | const throw (CDMException) [inline] |
same as fimexTime2unitTime but copying fiTime instead of referencing, needed for i.e. bind1st(mem_fun())
References fimexTime2unitTime().