|
Rcpp Version 0.9.10
|
#include <Rcpp/Date.h>#include <Rcpp/Function.h>#include <time.h>#include "sys/types.h"#include "string.h"#include "limits.h"#include <errno.h>#include "stdlib.h"#include "stdint.h"#include "stdio.h"#include "fcntl.h"#include "float.h"#include <unistd.h>
Go to the source code of this file.
Classes | |
| struct | Rcpp::tzhead |
| struct | Rcpp::ttinfo |
| struct | Rcpp::lsinfo |
| struct | Rcpp::state |
| struct | Rcpp::rule |
Namespaces | |
| namespace | Rcpp |
Rcpp API. | |
Defines | |
| #define | isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) |
| #define | days_in_year(year) (isleap(year) ? 366 : 365) |
| #define | _NO_OLDNAMES |
| #define | EOVERFLOW 79 |
| #define | TYPE_BIT(type) (sizeof (type) * CHAR_BIT) |
| #define | TYPE_SIGNED(type) (((type) -1) < 0) |
| #define | TYPE_INTEGRAL(type) (((type) 0.5) != 0.5) |
| #define | GRANDPARENTED "Local time zone must be set--see zic manual page" |
| #define | YEARSPERREPEAT 400 |
| #define | AVGSECSPERYEAR 31556952L |
| #define | SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR) |
| #define | SECSPERREPEAT_BITS 34 |
| #define | is_digit(c) ((unsigned)(c) - '0' <= 9) |
| #define | INITIALIZE(x) (x = 0) |
| #define | TZFILE_H |
| #define | TZDIR "/usr/local/etc/zoneinfo" |
| #define | TZDEFAULT "localtime" |
| #define | TZDEFRULES "America/New_York" |
| #define | TZ_MAGIC "TZif" |
| #define | TZ_MAX_TIMES 1200 |
| #define | TZ_MAX_TYPES 256 |
| #define | TZ_MAX_CHARS 50 |
| #define | TZ_MAX_LEAPS 50 |
| #define | SECSPERMIN 60 |
| #define | MINSPERHOUR 60 |
| #define | HOURSPERDAY 24 |
| #define | DAYSPERWEEK 7 |
| #define | DAYSPERNYEAR 365 |
| #define | DAYSPERLYEAR 366 |
| #define | SECSPERHOUR (SECSPERMIN * MINSPERHOUR) |
| #define | SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) |
| #define | MONSPERYEAR 12 |
| #define | TM_SUNDAY 0 |
| #define | TM_MONDAY 1 |
| #define | TM_TUESDAY 2 |
| #define | TM_WEDNESDAY 3 |
| #define | TM_THURSDAY 4 |
| #define | TM_FRIDAY 5 |
| #define | TM_SATURDAY 6 |
| #define | TM_JANUARY 0 |
| #define | TM_FEBRUARY 1 |
| #define | TM_MARCH 2 |
| #define | TM_APRIL 3 |
| #define | TM_MAY 4 |
| #define | TM_JUNE 5 |
| #define | TM_JULY 6 |
| #define | TM_AUGUST 7 |
| #define | TM_SEPTEMBER 8 |
| #define | TM_OCTOBER 9 |
| #define | TM_NOVEMBER 10 |
| #define | TM_DECEMBER 11 |
| #define | TM_YEAR_BASE baseYear |
| #define | EPOCH_YEAR 1970 |
| #define | EPOCH_WDAY TM_THURSDAY |
| #define | isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) |
| #define | isleap_sum(a, b) isleap((a) % 400 + (b) % 400) |
| #define | OPEN_MODE O_RDONLY |
| #define | TZDEFRULESTRING ",M4.1.0,M10.5.0" |
| #define | BIGGEST(a, b) (((a) > (b)) ? (a) : (b)) |
| #define | MY_TZNAME_MAX 255 |
| #define | JULIAN_DAY 0 |
| #define | DAY_OF_YEAR 1 |
| #define | MONTH_NTH_DAY_OF_WEEK 2 |
| #define | gmtptr (&gmtmem) |
Functions | |
| static struct tm * | Rcpp::gmtime_ (const time_t *const timep) |
| Date | Rcpp::operator+ (const Date &date, int offset) |
| int | Rcpp::operator- (const Date &d1, const Date &d2) |
| bool | Rcpp::operator< (const Date &d1, const Date &d2) |
| bool | Rcpp::operator> (const Date &d1, const Date &d2) |
| bool | Rcpp::operator== (const Date &d1, const Date &d2) |
| bool | Rcpp::operator>= (const Date &d1, const Date &d2) |
| bool | Rcpp::operator<= (const Date &d1, const Date &d2) |
| bool | Rcpp::operator!= (const Date &d1, const Date &d2) |
| template<> | |
| SEXP | Rcpp::wrap (const Date &date) |
| static int | Rcpp::tzparse (const char *name, struct state *sp, int lastditch) |
| static int | Rcpp::typesequiv (const struct state *sp, int a, int b) |
| static const char * | Rcpp::getsecs (const char *strp, long *secsp) |
| static const char * | Rcpp::getnum (const char *strp, int *const nump, const int min, const int max) |
| static const char * | Rcpp::getrule (const char *strp, struct rule *const rulep) |
| static time_t | Rcpp::transtime (const time_t janfirst, const int year, const struct rule *const rulep, const long offset) |
| static struct tm * | Rcpp::timesub (const time_t *const timep, const long offset, const struct state *const sp, struct tm *const tmp) |
| static int | Rcpp::leaps_thru_end_of (const int y) |
| static int | Rcpp::increment_overflow (int *number, int delta) |
| static long | Rcpp::detzcode (const char *const codep) |
| static time_t | Rcpp::detzcode64 (const char *const codep) |
| static int | Rcpp::differ_by_repeat (const time_t t1, const time_t t0) |
| static const char * | Rcpp::getzname (const char *strp) |
| static const char * | Rcpp::getqzname (const char *strp, const int delim) |
| static const char * | Rcpp::getoffset (const char *strp, long *const offsetp) |
| static int | Rcpp::tzload (const char *name, struct state *const sp, const int doextend) |
| static void | Rcpp::gmtload (struct state *const sp) |
| static struct tm * | Rcpp::gmtsub (const time_t *const timep, const long offset, struct tm *const tmp) |
Variables | |
| static const char | Rcpp::gmt [] = "GMT" |
| static const int | Rcpp::mon_lengths [2][MONSPERYEAR] |
| static const int | Rcpp::year_lengths [2] |
| static int | Rcpp::gmt_is_set |
| static struct state | Rcpp::gmtmem |
| static struct tm | Rcpp::tm |
| #define DAY_OF_YEAR 1 |
Definition at line 443 of file Date.cpp.
Referenced by Rcpp::getrule(), and Rcpp::transtime().
| #define days_in_year | ( | year | ) | (isleap(year) ? 366 : 365) |
Referenced by Rcpp::Date::mktime00().
| #define DAYSPERLYEAR 366 |
Definition at line 326 of file Date.cpp.
Referenced by Rcpp::getrule(), and Rcpp::timesub().
| #define DAYSPERNYEAR 365 |
Definition at line 325 of file Date.cpp.
Referenced by Rcpp::getrule(), and Rcpp::timesub().
| #define DAYSPERWEEK 7 |
Definition at line 324 of file Date.cpp.
Referenced by Rcpp::getrule(), Rcpp::getsecs(), Rcpp::timesub(), and Rcpp::transtime().
| #define EPOCH_WDAY TM_THURSDAY |
Definition at line 355 of file Date.cpp.
Referenced by Rcpp::timesub().
| #define EPOCH_YEAR 1970 |
Definition at line 354 of file Date.cpp.
Referenced by Rcpp::timesub(), and Rcpp::tzparse().
| #define gmtptr (&gmtmem) |
Definition at line 460 of file Date.cpp.
Referenced by Rcpp::gmtsub().
| #define GRANDPARENTED "Local time zone must be set--see zic manual page" |
| #define HOURSPERDAY 24 |
Definition at line 323 of file Date.cpp.
Referenced by Rcpp::getsecs().
Definition at line 200 of file Date.cpp.
Referenced by Rcpp::transtime(), and Rcpp::tzparse().
| #define is_digit | ( | c | ) | ((unsigned)(c) - '0' <= 9) |
Definition at line 199 of file Date.cpp.
Referenced by Rcpp::getnum(), Rcpp::getrule(), and Rcpp::getzname().
Definition at line 357 of file Date.cpp.
Referenced by Rcpp::Date::mktime00(), Rcpp::timesub(), Rcpp::transtime(), and Rcpp::tzparse().
| #define JULIAN_DAY 0 |
Definition at line 442 of file Date.cpp.
Referenced by Rcpp::getrule(), and Rcpp::transtime().
| #define MINSPERHOUR 60 |
Definition at line 322 of file Date.cpp.
Referenced by Rcpp::getsecs().
| #define MONSPERYEAR 12 |
Definition at line 329 of file Date.cpp.
Referenced by Rcpp::getrule().
| #define MONTH_NTH_DAY_OF_WEEK 2 |
Definition at line 444 of file Date.cpp.
Referenced by Rcpp::getrule(), and Rcpp::transtime().
| #define OPEN_MODE O_RDONLY |
Definition at line 381 of file Date.cpp.
Referenced by Rcpp::tzload().
| #define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) |
Definition at line 328 of file Date.cpp.
Referenced by Rcpp::timesub(), Rcpp::transtime(), and Rcpp::tzparse().
| #define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) |
Definition at line 327 of file Date.cpp.
Referenced by Rcpp::getrule(), Rcpp::getsecs(), Rcpp::timesub(), and Rcpp::tzparse().
| #define SECSPERMIN 60 |
Definition at line 321 of file Date.cpp.
Referenced by Rcpp::getsecs(), and Rcpp::timesub().
| #define SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR) |
Definition at line 197 of file Date.cpp.
Referenced by Rcpp::differ_by_repeat().
| #define SECSPERREPEAT_BITS 34 |
Definition at line 198 of file Date.cpp.
Referenced by Rcpp::differ_by_repeat().
| #define TYPE_BIT | ( | type | ) | (sizeof (type) * CHAR_BIT) |
Definition at line 191 of file Date.cpp.
Referenced by Rcpp::differ_by_repeat().
| #define TYPE_INTEGRAL | ( | type | ) | (((type) 0.5) != 0.5) |
Definition at line 193 of file Date.cpp.
Referenced by Rcpp::differ_by_repeat(), and Rcpp::tzload().
| #define TYPE_SIGNED | ( | type | ) | (((type) -1) < 0) |
Definition at line 192 of file Date.cpp.
Referenced by Rcpp::differ_by_repeat(), and Rcpp::tzload().
| #define TZ_MAX_CHARS 50 |
Definition at line 313 of file Date.cpp.
Referenced by Rcpp::tzload().
| #define TZ_MAX_LEAPS 50 |
Definition at line 318 of file Date.cpp.
Referenced by Rcpp::tzload().
| #define TZ_MAX_TIMES 1200 |
Definition at line 296 of file Date.cpp.
Referenced by Rcpp::tzload(), and Rcpp::tzparse().
| #define TZ_MAX_TYPES 256 |
Definition at line 301 of file Date.cpp.
Referenced by Rcpp::tzload().
| #define TZDEFAULT "localtime" |
Definition at line 230 of file Date.cpp.
Referenced by Rcpp::tzload().
| #define TZDEFRULES "America/New_York" |
Definition at line 234 of file Date.cpp.
Referenced by Rcpp::tzparse().
| #define TZDEFRULESTRING ",M4.1.0,M10.5.0" |
Definition at line 394 of file Date.cpp.
Referenced by Rcpp::tzparse().
| #define YEARSPERREPEAT 400 |
Definition at line 195 of file Date.cpp.
Referenced by Rcpp::tzload().