TECA
The Toolkit for Extreme Climate Analysis
teca_calendar_util.h File Reference
#include "teca_config.h"
#include "teca_variant_array.h"
#include "teca_metadata.h"
#include <string>
#include <ostream>
#include <cstring>
#include <memory>
Include dependency graph for teca_calendar_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  teca_calendar_util::time_point
 
class  teca_calendar_util::interval_iterator
 An iterator over a series of time intervals. More...
 
class  teca_calendar_util::season_iterator
 Enumerate ranges of time steps bracketing seasons. More...
 
class  teca_calendar_util::year_iterator
 Enumerate ranges of time steps bracketing months. More...
 
class  teca_calendar_util::month_iterator
 Enumerate ranges of time steps bracketing months. More...
 
class  teca_calendar_util::day_iterator
 Enumerate ranges of time steps bracketing days. More...
 
class  teca_calendar_util::interval_iterator_factory
 A factory for interval_iterator. More...
 

Namespaces

 teca_calendar_util
 Codes dealing with calendaring.
 

Typedefs

using teca_calendar_util::p_interval_iterator = std::shared_ptr< interval_iterator >
 

Functions

const TECA_EXPORT char * teca_calendar_util::get_season_name (int month)
 returns one of DJF,MAM,JJA,SON based on the month passed in More...
 
TECA_EXPORT std::ostream & operator<< (std::ostream &os, const teca_calendar_util::time_point &tpt)
 send the time_point to a stream in humnan readable form More...
 
Gregorian calendar

functions for date computations in gregorian calendar. to use convert the origin to a gergorian_number do the calculation and convert the number back into a date useing date_from_gregorian_number. for details about the math and an explanation of the errors see http://alcor.concordia.ca/~gpkatch/gdate-algorithm.html

TECA_EXPORT long teca_calendar_util::gregorian_number (long y, long m, long d)
 
TECA_EXPORT void teca_calendar_util::date_from_gregorian_number (long g, long &y, long &m, long &d)
 
TECA_EXPORT bool teca_calendar_util::valid_gregorian_date (long y, long m, long d)
 
Gregorian calendar

functions for date computations in gregorian calendar. to use convert the origin to a gergorian_number do the calculation and convert the number back into a date useing date_from_gregorian_number. for details about the math and an explanation of the errors see http://alcor.concordia.ca/~gpkatch/gdate-algorithm.html

TECA_EXPORT long teca_calendar_util::gregorian_number (long y, long m, long d)
 
TECA_EXPORT void teca_calendar_util::date_from_gregorian_number (long g, long &y, long &m, long &d)
 
TECA_EXPORT bool teca_calendar_util::valid_gregorian_date (long y, long m, long d)
 

Function Documentation

◆ operator<<()

TECA_EXPORT std::ostream& operator<< ( std::ostream &  os,
const teca_calendar_util::time_point tpt 
)

send the time_point to a stream in humnan readable form