TECA
The Toolkit for Extreme Climate Analysis
teca_calendar_util Namespace Reference

Codes dealing with calendaring. More...

Classes

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

Typedefs

using p_interval_iterator = std::shared_ptr< interval_iterator >
 

Functions

const char * get_season_name (int month)
 returns one of DJF,MAM,JJA,SON based on the month passed in More...
 

Detailed Description

Codes dealing with calendaring.

Function Documentation

◆ date_from_gregorian_number()

void teca_calendar_util::date_from_gregorian_number ( long  g,
long &  y,
long &  m,
long &  d 
)

input:

g : date number computed from gregorian_number

returns:

y : 4 digit year m : 2 digit month d : 2 digit day

◆ get_season_name()

const char* teca_calendar_util::get_season_name ( int  month)

returns one of DJF,MAM,JJA,SON based on the month passed in

◆ gregorian_number()

long teca_calendar_util::gregorian_number ( long  y,
long  m,
long  d 
)

return a date number for the given date that can be used in computations. input:

y : 4 digit year m : 2 digit month d : 2 digit day

◆ valid_gregorian_date()

bool teca_calendar_util::valid_gregorian_date ( long  y,
long  m,
long  d 
)

input:

y : 4 digit year m : 2 digit month d : 2 digit day

returns:

true if the date is valid in the gregorian calendar and our conversion algorithm.