|
MI - Fimex
|
#include <TimeUnit.h>
Public Member Functions | |
| TimeUnit () throw (CDMException) | |
| initialize a timeUnit with a unit string More... | |
| TimeUnit (const std::string &timeUnitString) throw (CDMException) | |
| virtual | ~TimeUnit () |
| double | unitTime2epochSeconds (double unitTime) const |
| calculate the epochSeconds for a time in the current unit More... | |
| boost::posix_time::ptime | unitTime2posixTime (double unitTime) const |
| calculate the ptime for a time in the current unit More... | |
| double | epochSeconds2unitTime (double epochSeconds) const |
| calculate the time in the current unit from the epoch More... | |
| FimexTime | unitTime2fimexTime (double unitTime) const throw (CDMException) |
| calculate the time in a calendar form More... | |
| double | fimexTime2unitTime (const FimexTime &fiTime) const throw (CDMException) |
| calculate the time in the current unit from the calendar form More... | |
| double | fimexTime2unitTimeX (FimexTime fiTime) const throw (CDMException) |
| same as fimexTime2unitTime but copying fiTime instead of referencing, needed for i.e. bind1st(mem_fun()) More... | |
| double | posixTime2unitTime (boost::posix_time::ptime poTime) const throw (CDMException) |
| calculate the unitTime from a boost::posix_time More... | |
TimeUnit calculates times from a time given in a unit as of CF-1.0 (e.g. 'days since 2000-01-01 00:00:00') to a unix time (i.e. 'seconds since 1970-01-01 00:00:00') or a time struct MetNoFimex::FimexTime
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 |
| double MetNoFimex::TimeUnit::epochSeconds2unitTime | ( | double | epochSeconds | ) | const |
calculate the time in the current unit from the epoch
| double MetNoFimex::TimeUnit::fimexTime2unitTime | ( | const FimexTime & | fiTime | ) | const |
| throw | ( | CDMException | |||
| ) | |||||
calculate the time in the current unit from the calendar form
|
inline | ||||||||||||||
same as fimexTime2unitTime but copying fiTime instead of referencing, needed for i.e. bind1st(mem_fun())
| double MetNoFimex::TimeUnit::posixTime2unitTime | ( | boost::posix_time::ptime | poTime | ) | const |
| throw | ( | CDMException | |||
| ) | |||||
calculate the unitTime from a boost::posix_time
| double MetNoFimex::TimeUnit::unitTime2epochSeconds | ( | double | unitTime | ) | const |
calculate the epochSeconds for a time in the current unit
| FimexTime MetNoFimex::TimeUnit::unitTime2fimexTime | ( | double | unitTime | ) | const |
| throw | ( | CDMException | |||
| ) | |||||
calculate the time in a calendar form
| boost::posix_time::ptime MetNoFimex::TimeUnit::unitTime2posixTime | ( | double | unitTime | ) | const |
calculate the ptime for a time in the current unit
1.8.11