[Rcpp-commits] r472 - pkg/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 26 19:26:06 CET 2010
Author: edd
Date: 2010-01-26 19:26:06 +0100 (Tue, 26 Jan 2010)
New Revision: 472
Modified:
pkg/src/RcppDate.h
Log:
unbreak Date conversion by restoring getJDN() non-offset Julian number
add new getter getJulian() to be compatible with R's julian() relative to the epoch
Modified: pkg/src/RcppDate.h
===================================================================
--- pkg/src/RcppDate.h 2010-01-26 17:30:03 UTC (rev 471)
+++ pkg/src/RcppDate.h 2010-01-26 18:26:06 UTC (rev 472)
@@ -4,6 +4,7 @@
//
// Copyright (C) 2005 - 2006 Dominick Samperi
// Copyright (C) 2008 Dirk Eddelbuettel
+// Copyright (C) 2009 - 2010 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
@@ -41,7 +42,8 @@
int getMonth() const { return month; }
int getDay() const { return day; }
int getYear() const { return year; }
- int getJDN() const { return jdn - Jan1970Offset; }
+ int getJDN() const { return jdn; }
+ int getJulian() const { return jdn - Jan1970Offset; }
// Minimal set of date operations.
friend RcppDate operator+(const RcppDate &date, int offset);
More information about the Rcpp-commits
mailing list