--- date-1.2.32.orig/debian/watch
+++ date-1.2.32/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts="uversionmangle=s/-/\./" \
+	http://cran.r-project.org/src/contrib/date_([-0-9\.]*)\.tar\.gz
--- date-1.2.32.orig/debian/copyright
+++ date-1.2.32/debian/copyright
@@ -0,0 +1,32 @@
+This is the Debian GNU/Linux r-cran-date package of date, a collection
+of functions for handlind dates in GNU R.  Date was written by Terry
+Therneau, and ported to R by Thomas Lumley, Kjetil Halvorsen and Kurt
+Hornik.
+
+This package was created by Dirk Eddelbuettel <edd@debian.org>.
+The sources were downloaded from 
+	http://cran.us.r-project.org/src/contrib/
+
+The package was renamed from its upstream name 'date' to 'r-cran-date'
+to highlight the fact that is it a CRAN package for R.
+
+Copyright (C) 1998-2008 Terry Therneau 
+Portions Copyright (C) 1998-2008 Thomas Lumley, Kjetil Halvorsen, Kurt Hornik
+
+License: GPL-2
+
+On a Debian GNU/Linux system, the GPL-2 license is included in the
+file /usr/share/common-licenses/GPL-2.
+
+For reference, the upstream DESCRIPTION file is included below:
+
+   Package: date
+   Version: 1.2-18
+   Author: Terry Therneau <therneau@mayo.edu>.  R port by Thomas Lumley
+    <thomas@biostat.washington.edu>, Kjetil Halvorsen <khal@alumni.uv.es>,
+    and Kurt Hornik <Kurt.Hornik@R-project.org>.
+   Maintainer: Kurt Hornik <Kurt.Hornik@R-project.org>
+   Title: Functions for handling dates
+   Description: Functions for handling dates.
+   License: GPL
+   Packaged: Wed Jun  9 08:59:15 2004; hornik
--- date-1.2.32.orig/debian/changelog
+++ date-1.2.32/debian/changelog
@@ -0,0 +1,146 @@
+date (1.2.32-1.13.201403190504) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Wed, 19 Mar 2014 05:04:57 +0100
+
+date (1.2.32-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Wed, 18 Jan 2012 07:49:01 -0600
+
+date (1.2.31-2) unstable; urgency=low
+
+  * debian/control: Updated Standard-Versions: to current version
+  * debian/control: Updated (Build-)Depends: to current R version
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Fri, 23 Dec 2011 08:28:40 -0600
+
+date (1.2.31-1) unstable; urgency=low
+
+  * New upstream release
+
+  * debian/control: Set (Build-)Depends: to current R version
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Tue, 04 Oct 2011 08:23:36 -0500
+
+date (1.2.30-1) unstable; urgency=low
+
+  * New upstream release
+
+  * debian/control: Set (Build-)Depends: to current R version
+  * debian/control: Set Standards-Version: to current version 
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Sun, 18 Sep 2011 15:17:48 -0500
+
+date (1.2.29-1) unstable; urgency=low
+
+  * New upstream release
+
+  * debian/control: Set (Build-)Depends: to current R version
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Tue, 20 Oct 2009 06:52:55 -0500
+
+date (1.2.28-1) unstable; urgency=low
+
+  * New upstream release
+
+  * debian/control: Changed Section: to 'gnu-r'
+  
+  * debian/control: Set (Build-)Depends: to current R version
+  * debian/control: Set Standards-Version: to current version 
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Thu, 10 Sep 2009 16:03:08 -0500
+
+date (1.2.27-1) unstable; urgency=low
+
+  * New upstream release
+
+  * debian/control: Set (Build-)Depends: to current R version
+  * debian/control: Set Standards-Version: to current version 3.8.0
+  
+ -- Dirk Eddelbuettel <edd@debian.org>  Thu, 05 Feb 2009 21:44:51 -0600
+
+date (1.2.26-1) unstable; urgency=low
+
+  * New upstream release
+
+  * debian/control: Set (Build-)Depends: to current R version
+  * debian/control: Set Standards-Version: to current version 3.7.3
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Tue, 25 Dec 2007 10:08:09 -0600
+
+date (1.2.25-1) unstable; urgency=low
+
+  * New upstream release
+  * debian/control: Updated (Build-)Depends: to 'r-base-(core|dev) (>= 2.5.1)'
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Fri, 13 Jul 2007 14:20:50 -0500
+
+date (1.2.24-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Thu,  1 Feb 2007 10:05:15 -0600
+
+date (1.2.23-1) unstable; urgency=low
+
+  * New upstream release
+  * Upload intended for unstable only as etch is frozen
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Tue, 19 Dec 2006 19:52:18 -0600
+
+date (1.2.22-1) unstable; urgency=low
+
+  * New upstream release, built with R 2.4.0 rc
+  * debian/control: Updated (Build-)Depensd to r-base-core (>> 2.3.1)
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Fri, 29 Sep 2006 15:38:32 -0500
+
+date (1.2.21-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Mon, 11 Sep 2006 17:32:02 -0500
+
+date (1.2.20-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Sat,  5 Aug 2006 09:36:09 -0500
+
+date (1.2.19-1) unstable; urgency=low
+
+  * New upstream release
+  
+  * debian/rules: Simplified to cdbs-based one-liner sourcing r-cran.mk 
+  * debian/control: Hence Build-Depends: updated to r-base-dev (>= 2.3.1)
+  
+  * debian/control: Standards-Version: increased to 3.7.2
+
+  * debian/post{inst,rm}: No longer call R to update html help index
+
+  * debian/watch: Updated to version: 3 
+  
+ -- Dirk Eddelbuettel <edd@debian.org>  Mon, 26 Jun 2006 16:53:32 -0500
+
+date (1.2.18-2) unstable; urgency=low
+
+  * Rebuilt under R 2.0.0
+  * debian/control: Updated Build-Depends: and Depends: accordingly
+  * debian/post{inst,rm}: Only run build-help.pl if R is installed
+  * debian/watch: Added watch file
+
+  * debian/control: Added comment to Description that R itself now has
+    more powerful facilities than this package.
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Fri,  8 Oct 2004 19:21:29 -0500
+
+date (1.2.18-1) unstable; urgency=low
+
+  * Initial Debian Release
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Fri, 11 Jun 2004 23:21:56 -0500
+
+
--- date-1.2.32.orig/debian/control
+++ date-1.2.32/debian/control
@@ -0,0 +1,18 @@
+Source: date
+Section: gnu-r
+Priority: optional
+Maintainer: Dirk Eddelbuettel <edd@debian.org>
+Build-Depends: debhelper (>= 7.0.0), cdbs, r-base-dev (>= 2.14.1)
+Standards-Version: 3.9.2
+
+Package: r-cran-date
+Architecture: any
+Depends: ${shlibs:Depends}, r-base-core (>= 2.14.1)
+Description: GNU R package for date handling
+ This CRAN package provides functions for handling dates, along with
+ examples and documentation.
+ .
+ Note that this is a legacy package providing functionality that had 
+ been absent from R. However, more recent versions of R have more 
+ powerful date and datetime functionality in the base package, i.e.
+ r-base-core under Debian.
--- date-1.2.32.orig/debian/rules
+++ date-1.2.32/debian/rules
@@ -0,0 +1,9 @@
+#!/usr/bin/make -f
+# 							-*- makefile -*-
+# debian/rules file for the Debian/GNU Linux r-cran-date package
+# Copyright 2003 - 2006 by Dirk Eddelbuettel <edd@debian.org>
+
+include /usr/share/R/debian/r-cran.mk
+
+
+
--- date-1.2.32.orig/date/MD5
+++ date-1.2.32/date/MD5
@@ -0,0 +1,13 @@
+007a67f21c134e73cec0048cca4c612e *ChangeLog
+fdd66681c6e22d1dc47ef0c33a3084a4 *DESCRIPTION
+02629004e7b9ebb92117ff9658eb14c3 *NAMESPACE
+158e366222ff43852129665faff107e8 *R/date.R
+990d8a3a3ce75b6d7471257d849e157a *inst/CITATION
+527f9134efafcb21a9f296e6d49a91b7 *man/as.date.Rd
+0dbec559eb5a374a7daa6f9724d79350 *man/date.ddmmmyy.Rd
+6da259c0f5f184f490ba2ae8c9d10617 *man/date.mdy.Rd
+88348f607e88c637d80a07d6a26c9f04 *man/date.mmddyy.Rd
+142d36a74c2ff94965e87825db4a192d *man/date.mmddyyyy.Rd
+985bc0737a3318f257e33097aaa1be2c *man/date.object.Rd
+c0b2d7348776c34480f8880afcd768d3 *man/mdy.date.Rd
+2aa5d9dd0cd92f43becb3b8b119407f4 *src/char_date.c
--- date-1.2.32.orig/date/DESCRIPTION
+++ date-1.2.32/date/DESCRIPTION
@@ -0,0 +1,14 @@
+Package: date
+Version: 1.2-32
+Date: 2011-12-23
+Author: Terry Therneau <therneau@mayo.edu>.  R port by Thomas Lumley
+ <thomas@biostat.washington.edu>, Kjetil Halvorsen <khal@alumni.uv.es>,
+ and Kurt Hornik <Kurt.Hornik@R-project.org>.
+Maintainer: Kurt Hornik <Kurt.Hornik@R-project.org>
+Title: Functions for handling dates
+Description: Functions for handling dates.
+Imports: graphics
+License: GPL-2
+Packaged: 2011-12-23 06:50:32 UTC; hornik
+Repository: CRAN
+Date/Publication: 2011-12-23 06:49:52
--- date-1.2.32.orig/date/ChangeLog
+++ date-1.2.32/date/ChangeLog
@@ -0,0 +1,204 @@
+2011-12-23  Kurt Hornik  <Kurt.Hornik@wu.ac.at>
+
+	* R/date.R (summary.date): Sanitize handling of extra arguments.
+	Spotted by Marina Saadia Otero <marina.saadia@gmail.com>.
+
+2011-10-04  Kurt Hornik  <Kurt.Hornik@wu.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-31.
+
+	* R/date.R
+	(as.vector.date): Coerce to numeric instead of character for
+	mode = "any" so that pairs() can work.
+	Suggested by Lasse Engbo Christiansen <lec@imm.dtu.dk>.
+	(Axis.date): Added.
+	Donated by Lasse Engbo Christiansen <lec@imm.dtu.dk>.
+
+2011-09-18  Kurt Hornik  <Kurt.Hornik@wu.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-30.
+
+	* NAMESPACE: Added.
+
+2009-10-20  Kurt Hornik  <Kurt.Hornik@wu.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-29.
+
+	* R/date.R (date.mdy): Fix nuisance spotted by David Bronaugh
+	<bronaugh@uvic.ca>.
+
+2009-09-10  Kurt Hornik  <Kurt.Hornik@wu.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-28.
+
+	* inst/CITATION: Improve.
+
+2009-02-05  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-27.
+
+	* inst/CITATION: Improve.
+
+2007-12-24  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-26.
+
+	* R/date.R (summary.date): Add ... so that na.rm can be used,
+	Suggested by Steven McKinney <smckinney@bccrc.ca>.
+
+2007-07-12  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-25.
+	(License): Clarify.
+
+2007-02-01  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* inst/CITATION: Get date/year and version from the package
+	metadata.
+
+2006-12-19  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-23.
+
+	* R/date.R (as.character.date): Add missing ... argument.
+
+2006-09-29  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-22.
+
+	* R/date.R: Fix invalid escapes.
+
+2006-09-09  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-21.
+	(Depends): Added.
+
+2006-08-05  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-20.
+
+	* man/as.date.Rd: Fix inconsistency spotted by Antony Unwin
+	<unwin@math.uni-augsburg.de>.
+
+2006-06-26  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-19.
+
+	* inst/CITATION: New file.
+
+2004-06-09  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-18.
+	(License): Change to GPL as permitted by Terry Therneau.
+
+2004-01-31  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-17.
+
+	* INDEX: Removed.
+	* TITLE: Removed.
+
+2003-08-06  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-16.
+
+	* man/date.object.Rd: Remove usage for as.data() as this is
+	documented (correctly) in 'as.date.Rd', and hence also the now
+	unnecessary \synopsis.
+
+2003-07-29  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-15.
+
+	* R/date.R (print.date): print.atomic() is gone from R 1.8.0.
+	Also, replace code repeated from as.character.date() by a call to
+	it.
+
+2003-07-28  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-14.
+
+	* R/date.R (as.vector.date): Prototype has 'mode' and not 'type'
+	as the second argument.
+
+2003-04-23  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-13.
+	(Author, Maintainer): Update KH email address.
+
+2002-03-31  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-12.
+
+	* INDEX: Rebuilt.
+
+	* R/date.R (date.ddmmmyy, date.mmddyy, date.mmddyyyy): Be
+	defensive about R 1.5.0 character NAs.
+
+2001-11-27  Kurt Hornik  <Kurt.Hornik@ci.tuwien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-11.
+
+	* R/date.R: .Alias() is gone in R 1.4.0, hence remove.
+
+2001-08-16  Kurt Hornik  <Kurt.Hornik@ci.tuwien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-10.
+
+	* R/date.R: Add missing `...' to print.date().
+
+2001-07-14  Kurt Hornik  <Kurt.Hornik@ci.tuwien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-9.
+
+	* man/date.ddmmmyy.Rd: Fix unbalanced braces.
+
+2001-06-02  Kurt Hornik  <Kurt.Hornik@ci.tuwien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-8.
+
+	* man/date.object.Rd: Codoc fixes.
+
+2001-03-24  Kurt Hornik  <Kurt.Hornik@ci.tuwien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-7.
+
+	* R/date.R: Add `PACKAGE' argument to FF calls.
+
+2001-02-25  Kurt Hornik  <Kurt.Hornik@ci.tuwien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-6.
+
+	* R/date.R: Fix problem in mdy.date() reported by Alex McMillan
+	<mcmillan@cc.ucsf.edu>.
+
+2000-12-24  Kurt Hornik  <Kurt.Hornik@ci.tuwien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-5.
+	(Maintainer): New entry.
+
+Sun Jun 18 12:09:05 2000  Kurt Hornik  <Kurt.Hornik@ci.tuwien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-4.
+
+	* man/*.Rd: Add keyword `chron'.
+
+	* man/is.date.Rd: Rename to `date.object.Rd'.  Add \alias entries
+	for methods for objects of class "date".
+
+Sat May  6 09:30:34 2000  Kurt Hornik  <Kurt.Hornik@ci.tuwien.ac.at>
+
+	* DESCRIPTION (Version): New version in 1.2-3.
+
+	* R/date.R: Improved plot.date() (following suggestions by Uwe
+	Ligges <ligges@statistik.uni-dortmund.de>).
+
+Sun May  2 01:32:48 1999  Kurt Hornik  <Kurt.Hornik@ci.tuwien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-2.
+
+	* R/date.R: New functions [[.date() and as.vector.date().
+
+Sun Apr 25 12:08:41 1999  Kurt Hornik  <Kurt.Hornik@ci.tuwien.ac.at>
+
+	* DESCRIPTION (Version): New version is 1.2-1.
--- date-1.2.32.orig/date/NAMESPACE
+++ date-1.2.32/date/NAMESPACE
@@ -0,0 +1,23 @@
+useDynLib("date")
+
+importFrom("graphics", "Axis", "plot")
+
+export("as.date",
+       "date.ddmmmyy", "date.mdy", "date.mmddyy", "date.mmddyyyy",
+       "is.date",
+       "mdy.date")
+
+S3method("Axis", "date")
+S3method("Math", "date")
+S3method("Ops", "date")
+S3method("Summary", "date")
+S3method("[", "date")
+S3method("[[", "date")
+S3method("as.character", "date")
+S3method("as.data.frame", "date")
+S3method("as.vector", "date")
+S3method("is.na", "date")
+S3method("plot", "date")
+S3method("print", "date")
+S3method("summary", "date")
+       
--- date-1.2.32.orig/date/R/date.R
+++ date-1.2.32/date/R/date.R
@@ -0,0 +1,302 @@
+as.date <- function(x, order = "mdy", ...) {
+    if (inherits(x, "date")) x
+    else if (is.character(x)) {
+	order.vec <-
+            switch(order,
+                   "ymd" = c(1, 2, 3),
+                   "ydm" = c(1, 3, 2),
+                   "mdy" = c(2, 3, 1),
+                   "myd" = c(2, 1, 3),
+                   "dym" = c(3, 1, 2),
+                   "dmy" = c(3, 2, 1),
+                   stop("Invalid value for 'order' option"))
+	nn <- length(x)
+	temp <- .C("char_date",
+                   as.integer(nn),
+                   as.integer(order.vec),
+                   as.character(x),
+                   month =integer(nn),
+                   day = integer(nn),
+                   year = integer(nn),
+                   PACKAGE = "date")
+	month <- ifelse(temp$month < 1 | temp$month > 12, NA, temp$month)
+	day   <- ifelse(temp$day == 0, NA, temp$day)
+	year  <- ifelse(temp$year == 0, NA, temp$year)
+	temp <- mdy.date(month, day, year, ...)
+    }
+    else if (is.numeric(x)) {
+	temp <- floor(x)
+	attr(temp, "class") <- "date"
+	}
+    else stop("Cannot coerce to date format")
+    temp
+}
+
+is.date <- function(x)
+    inherits(x, "date")
+
+Ops.date <- function(e1, e2) {
+    ## Certain operation yield a date, others just give a number.  In
+    ## order to make plotting functions work well, we end up allowing
+    ## most all numeric operations.
+    if (missing(e2))
+        stop("Unary operations not meaningful for dates")
+    if (.Generic == "&" || .Generic== "|")
+	stop(paste("'", .Generic, "' not meaningful for dates",
+                   sep = ""))
+    class(e1) <- NULL
+    class(e2) <- NULL
+    if (.Generic == "-") {
+	if (.Method[2] == "" ) {
+            ## subtract a constant from a date 
+            e1 <- as.integer(e1 - e2)
+            class(e1) <- "date"
+            e1
+        }
+	else if ((.Method[1] == "Ops.date" && .Method[2] == "Ops.date") ||
+		 (.Method[1] == ""))
+            e1 - e2
+	else
+            ## date - factor should fail
+            stop("Invalid operation for dates")
+	}
+    else if (.Generic == "+") {
+	if (.Method[1] == "" || .Method[2]=="")  {
+            ## add constant to a date
+            e1 <- as.integer(e1 + e2);
+            class(e1) <- "date"
+            e1
+        }
+	else e1 + e2
+	}
+    else get(.Generic)(e1, e2)
+}
+
+Math.date <- function(...)
+    stop("Invalid operation on dates")
+
+Summary.date <- function (..., na.rm = FALSE) {
+    ok <- switch(.Generic, min = , max = , range = TRUE, FALSE)
+    if (!ok)
+        stop(paste(.Generic, "not defined for dates"))
+    as.date(NextMethod(.Generic))
+}
+
+"[.date" <- function(x, ..., drop = TRUE) {
+    cl <- class(x)
+    class(x) <- NULL
+    x <- NextMethod("[")
+    class(x) <- cl
+    x
+}
+
+"[[.date" <- function(x, ..., drop = TRUE) {
+    cl <- class(x)
+    class(x) <- NULL
+    x <- NextMethod("[[")
+    class(x) <- cl
+    x
+}
+
+as.character.date <- function(x, ...) {
+    fun <- options()$print.date
+    if (is.null(fun))
+        date.ddmmmyy(x)
+    else
+        get(fun)(x)
+}
+
+as.data.frame.date <- as.data.frame.vector
+
+as.vector.date <- function(x, mode = "any") {
+    if (mode == "any")
+        as.vector(as.numeric(x), mode)
+    else if (mode == "character" || mode == "logical" || mode == "list")
+        as.vector(as.character(x), mode)
+    else as.vector(unclass(x), mode)
+}
+    
+is.na.date <- function(x) {
+    NextMethod(.Generic)
+}
+
+plot.date <- function(x, y, ..., axes, xaxt, xlab, ylab,
+                      xlim = range(x, na.rm = TRUE),
+                      ylim = range(y, na.rm = TRUE))
+{
+    if(missing(xlab))
+        xlab <- deparse(substitute(x))
+    if(missing(ylab))
+        ylab <- deparse(substitute(y))
+    class(x) <- NULL                    # after deparse(substitute())
+    if(!missing(axes) && !axes)         # argument axes works
+        plot(x, y, ..., axes = axes, xlab = xlab, ylab = ylab,
+            xlim = xlim, ylim = ylim)
+    else if(!missing(xaxt))
+        plot(x, y, ..., xaxt = xaxt, xlab = xlab, ylab = ylab,
+            xlim = xlim, ylim = ylim)
+    else {
+        plot(x, y, ..., xaxt = "n", xlab = xlab, ylab = ylab,
+            xlim = xlim, ylim = ylim)
+        x <- c(x[!is.na(x)], xlim)      # draws axis completely when
+                                        # using xlim
+        xd <- date.mdy(x)
+        ## get default for n from par("lab")
+        temp <- pretty(x, n = par("lab")[1])
+        delta <- temp[2] - temp[1]
+        if(delta < 1)
+            temp <- seq(min(x), max(x), 1)
+        else if(delta > 182) {
+            temp <- xd$year + (x - mdy.date(1, 1, xd$year))/365
+            ## get default for n from par("lab")
+            temp <- pretty(temp, n = par("lab")[1]) 
+            temp <- mdy.date(1, 1, floor(temp)) + floor((temp %% 1) * 365)
+        }
+        axis(1, temp, as.character.date(temp), ...)
+    }
+}
+
+print.date <- function(x, quote, prefix, ...) {
+    if (missing(quote))
+        quote <- FALSE
+    invisible(print(as.character(x), quote = quote))
+}
+
+summary.date <- function(object, ...) {
+    y <- as.character(range(object), ...)
+    names(y) <- c("First ", "Last  ")
+    y
+}
+
+Axis.date <-
+function(x = NULL, at = NULL, xlim=range(x, na.rm=TRUE), ..., 
+         side, labels = NULL)
+{
+    if(!is.null(x)) {
+        x <- c(x[!is.na(x)], xlim)
+        xd <- date.mdy(x)
+        temp <- pretty(x, n = par("lab")[1L])
+        delta <- temp[2L] - temp[1L]
+        if(delta < 1)
+            temp <- seq(min(x), max(x), 1)
+        else if(delta > 182) {
+            temp <- xd$year + (x - mdy.date(1, 1, xd$year)) / 365
+            temp <- pretty(temp, n = par("lab")[1L])
+            temp <- mdy.date(1, 1, floor(temp)) + floor((temp %% 1) * 365)
+        }
+        axis(side = side, at = temp, labels = as.character.date(temp), ...)
+    } else {
+        axis(side = side, at = at, labels = labels, ...)
+    }
+}
+
+mdy.date <- function(month, day, year, nineteen = TRUE, fillday = FALSE,
+                     fillmonth = FALSE) {
+    ## Get the Julian date, but centered a la SAS, i.e., Jan 1 1960 is
+    ## day 0.  Algorithm taken from Numerical Recipies.
+    temp <- any((month != trunc(month)) |
+                (day != trunc(day)) |
+                (year != trunc(year)))
+    if (!is.na(temp) && temp) {
+	warning("Non integer input values were truncated in mdy.date")
+	month <- trunc(month)
+	day <- trunc(day)
+	year <- trunc(year)
+    }
+    if (nineteen)
+        year <- ifelse(year < 100, year + 1900, year)
+
+    ## Force input vectors to be the same length, but in a way that
+    ## gives an error if their lengths aren't multiples of each other.
+    temp <- numeric(length(month + day + year))
+    month <- month + temp
+    day   <- day + temp
+    year  <- year + temp
+
+    if (fillmonth) {
+	temp <- is.na(month)
+	month[temp] <- 7
+	day[temp] <- 1
+	}
+    if (fillday) day[is.na(day)] <- 15
+
+    month[month < 1 | month > 12] <- NA
+    day[day < 1] <- NA
+    year[year == 0] <- NA               # there is no year 0
+    year <- ifelse(year < 0, year + 1, year)
+    tyear<- ifelse(month > 2, year, year - 1)
+    tmon <- ifelse(month > 2, month + 1, month + 13)
+
+    julian <-
+        trunc(365.25 * tyear) + trunc(30.6001 * tmon) + day - 715940
+    ## Check for Gregorian calendar changeover on Oct 15, 1582
+    temp <- trunc(0.01 * tyear)
+    save <- ifelse(julian >= -137774,
+                   julian + 2 + trunc(.25 * temp) - temp,
+                   julian)
+
+    ## Check for invalid days (31 Feb, etc.) by calculating the Julian
+    ## date of the first of the next month
+    year <- ifelse(month == 12, year+1, year)
+    month<- ifelse(month == 12, 1, month + 1)
+    day <- 1
+    tyear<- ifelse(month > 2, year, year - 1)
+    tmon <- ifelse(month > 2, month + 1, month + 13)
+    julian <-
+        trunc(365.25 * tyear) + trunc(30.6001 * tmon) + day - 715940
+    temp <- trunc(0.01 * tyear)
+    save2<- ifelse(julian >= -137774,
+                   julian + 2 + trunc(.25 * temp) - temp,
+                   julian)
+
+    temp <- as.integer(ifelse(save2 > save, save, NA))
+    attr(temp, "class") <- "date"
+    temp
+}
+
+date.mdy <- function(sdate, weekday = FALSE) {
+    ##  Return the month, day, and year given a julian date
+    attr(sdate, "class") <- NULL        # Stop any propogation of methods
+    sdate <- floor(sdate + 2436935)     # From SAS to Num Recipies base
+                                        # point 
+    wday <- as.integer((sdate + 1) %% 7 +1)
+    temp <- ((sdate - 1867216) -.25) / 36524.25
+    sdate <- ifelse(sdate >= 2299161,
+                    trunc(sdate+ 1 +temp - trunc(.25 * temp)),
+                    sdate)
+    jb <- sdate + 1524
+    jc <- trunc(6680 + ((jb - 2439870) - 122.1) / 365.25)
+    jd <- trunc(365.25 * jc)
+    je <- trunc((jb - jd)/ 30.6001)
+    day <- (jb - jd) - trunc(30.6001 * je)
+    month <- as.integer(ifelse(je > 13, je - 13, je - 1))
+    year  <- as.integer(ifelse(month > 2, jc - 4716, jc - 4715))
+    year  <- as.integer(ifelse(year <= 0, year - 1, year))
+    if (weekday)
+        list(month = month, day = day, year = year, weekday = wday)
+    else
+        list(month = month, day = day, year = year)
+}
+
+date.ddmmmyy <- function(sdate) {
+    temp <- date.mdy(sdate)
+    tyr <- ifelse(floor(temp$year/100) == 19,
+                  temp$year-1900, temp$year)
+    month <- month.abb[temp$month]
+    ifelse(is.na(sdate), as.character(NA),
+           paste(temp$day, month, tyr, sep = ""))
+}
+
+date.mmddyy <- function(sdate, sep = "/") {
+    temp <- date.mdy(sdate)
+    tyr <- ifelse(floor(temp$year / 100) == 19,
+                  temp$year - 1900, temp$year)
+    ifelse(is.na(sdate), as.character(NA),
+           paste(temp$month, temp$day, tyr, sep = sep))
+}
+
+date.mmddyyyy <- function(sdate, sep = "/") {
+    temp <- date.mdy(sdate)
+    ifelse(is.na(sdate), as.character(NA),
+           paste(temp$month, temp$day, temp$year, sep = sep))
+}
--- date-1.2.32.orig/date/man/date.mmddyyyy.Rd
+++ date-1.2.32/date/man/date.mmddyyyy.Rd
@@ -0,0 +1,29 @@
+\name{date.mmddyyyy}
+\alias{date.mmddyyyy}
+\title{Format a Julian date}
+\description{
+  Given a vector of Julian dates, this returns them in the form
+  ``10/11/1989'', ``28/7/1854'', etc.
+}
+\usage{
+date.mmddyyyy(sdate, sep = "/")
+}
+\arguments{
+  \item{sdate}{A vector of Julian dates, e.g., as returned by
+    \code{mdy.date()}.}
+  \item{sep}{Character string used to separate the month, day, and
+    year portions of the returned string.}
+}
+\value{
+  A vector of character strings containing the formatted dates.
+}
+\seealso{
+  \code{\link{date.mdy}},
+  \code{\link{mdy.date}}, 
+  \code{\link{date.ddmmmyy}}
+}
+
+\examples{
+date.mmddyyyy(as.date(1:10))
+}
+\keyword{chron}
--- date-1.2.32.orig/date/man/date.mmddyy.Rd
+++ date-1.2.32/date/man/date.mmddyy.Rd
@@ -0,0 +1,28 @@
+\name{date.mmddyy}
+\alias{date.mmddyy}
+\title{Format a Julian date}
+\description{
+  Given a vector of Julian dates, this returns them in the form
+  ``10/11/89'', ``28/7/54'', etc.
+}
+\usage{
+date.mmddyy(sdate, sep = "/")
+}
+\arguments{
+  \item{sdate}{A vector of Julian dates, e.g., as returned by
+    \code{mdy.date()}.}
+  \item{sep}{Character string used to separate the month, day, and
+    year portions of the returned string.}
+}
+\value{
+  A vector of character strings containing the formatted dates.
+}
+\seealso{
+  \code{\link{date.mdy}},
+  \code{\link{mdy.date}}, 
+  \code{\link{date.ddmmmyy}}
+}
+\examples{
+date.mmddyy(as.date(10))
+}
+\keyword{chron}
--- date-1.2.32.orig/date/man/date.object.Rd
+++ date-1.2.32/date/man/date.object.Rd
@@ -0,0 +1,54 @@
+\name{date.object}
+\alias{is.date}
+\alias{Math.date}
+\alias{Ops.date}
+\alias{Summary.date}
+\alias{[.date}
+\alias{[[.date}
+\alias{as.character.date}
+\alias{as.data.frame.date}
+\alias{as.vector.date}
+\alias{is.na.date}
+\alias{plot.date}
+\alias{print.date}
+\alias{summary.date}
+\title{Date Objects}
+\description{
+  Objects of class \code{"date"}.
+}
+\usage{
+is.date(x)
+}
+\arguments{
+  \item{x}{any R object.}
+}
+\details{
+  Dates are stored as the number of days since 1/1/1960, and are kept
+  in integer format.  (This is the same baseline value as is used by
+  SAS).  The numerical methods for dates treat \code{date - date} as a
+  numeric, and \code{date +- numeric} as a date.
+
+  \code{is.date} returns \code{TRUE} if \code{x} has class
+  \code{"date"}, and \code{FALSE} otherwise.  Its behavior is unaffected
+  by any attributes of \code{x}; for example, \code{x} could be a date
+  array (in contrast to the behavior of \code{is.vector}).
+
+  \code{as.date} returns \code{x} if \code{x} is a simple object of
+  class \code{"date"}, and otherwise a date vector of the same length as
+  \code{x} and with data resulting from coercing the elements of
+  \code{x} to class \code{"date"}.  See the manual page for
+  \code{as.date()} for details.
+
+  Logical operations as well as the numeric functions \code{exp()},
+  \code{log()}, and so on are invalid.
+
+  Other methods exist for missing value, \code{as.character()},
+  printing, and summarizing. 
+}
+\seealso{
+  \code{\link{date.mdy}},
+  \code{\link{mdy.date}},
+  \code{\link{date.ddmmmyy}}, 
+  \code{\link{as.date}}.
+}
+\keyword{chron}
--- date-1.2.32.orig/date/man/as.date.Rd
+++ date-1.2.32/date/man/as.date.Rd
@@ -0,0 +1,37 @@
+\name{as.date}
+\alias{as.date}
+\title{Coerce Data to Dates}
+\description{
+  Converts any of the following character forms to a Julian date:
+  8/31/56, 8-31-1956, 31 8 56, 083156, 31Aug56, or August 31 1956.
+}
+\usage{
+as.date(x, order = "mdy", ...)
+}
+\arguments{
+  \item{x}{input data vector.}
+  \item{order}{if \code{x} is character, defines the order in which the
+    terms are assumed to appear in a xx/xx/xx date.  The default is
+    month/day/year; any permutation of mdy is legal.}
+  \item{...}{if \code{x} is character, then any other arguments from
+    \code{mdy.date()} can be used as well.}
+}
+\value{
+  For each date, the number of days between it and January 1, 1960.
+  The date will be missing if the string is not interpretable.
+}
+\details{
+  If \code{x} is numeric, then \code{floor(x)} is returned, e.g.,
+  \code{as.date(35)} is the same as \code{as.date(35.2)} and gives
+  February 5, 1960 (\samp{5Feb60}).  If \code{x} is character, the
+  program attempts to parse it.
+}
+\seealso{
+  \code{\link{mdy.date}},
+  \code{\link{date.mmddyy}}, 
+  \code{\link{date.ddmmmyy}}
+}
+\examples{
+as.date(c("1jan1960", "2jan1960", "31mar1960", "30jul1960"))
+}
+\keyword{chron}
--- date-1.2.32.orig/date/man/date.ddmmmyy.Rd
+++ date-1.2.32/date/man/date.ddmmmyy.Rd
@@ -0,0 +1,25 @@
+\name{date.ddmmmyy}
+\alias{date.ddmmmyy}
+\title{Format a Julian date}
+\description{
+  Given a vector of Julian dates, this returns them in the form
+  ``10Nov89'', ``28Jul54'', etc.
+}
+\usage{
+date.ddmmmyy(sdate)
+}
+\arguments{
+  \item{sdate}{A vector of Julian dates, e.g., as returned by
+    \code{mdy.date()}.}
+}
+\value{
+  A vector of character strings containing the formatted dates.
+}
+\seealso{
+  \code{\link{mdy.date}},
+  \code{\link{date.mdy}}
+}
+\examples{
+date.ddmmmyy(1:10)
+}
+\keyword{chron}
--- date-1.2.32.orig/date/man/date.mdy.Rd
+++ date-1.2.32/date/man/date.mdy.Rd
@@ -0,0 +1,37 @@
+\name{date.mdy}
+\alias{date.mdy}
+\title{Convert from Julian Dates to Month, Day, and Year}
+\description{
+  Convert a vector of Julian dates to a list of vectors with the
+  corresponding values of month, day and year, and optionally weekday.
+}
+\usage{
+date.mdy(sdate, weekday = FALSE)
+}
+\arguments{
+  \item{sdate}{a Julian date value, as returned by \code{mdy.date()},
+    number of days since 1/1/1960.}
+  \item{weekday}{if \code{TRUE}, then the returned list also will
+    contain the day of the week (Sunday=1, Saturday=7).}
+}
+\value{
+  A list with components \code{month}, \code{day}, and \code{year}.
+}
+\examples{
+day <- 7
+temp <- date.mdy(mdy.date(month = 7, day = day, year = 1960))
+## Check for illegal dates, such as 29 Feb in a non leap year
+if (temp$day != day) {
+  cat("Some illegal dates\n")
+} else {
+  cat("All days are legal\n")
+}
+}
+\references{
+  Press, W. H., Teukolsky, S. A., Vetterling, W. T., and Flannery,
+  B. P. (1992).
+  \emph{Numerical Recipes: The Art of Scientific Computing (Second
+    Edition)}.
+  Cambridge University Press.
+}
+\keyword{chron}
--- date-1.2.32.orig/date/man/mdy.date.Rd
+++ date-1.2.32/date/man/mdy.date.Rd
@@ -0,0 +1,59 @@
+\name{mdy.date}
+\alias{mdy.date}
+\title{Convert to Julian Dates}
+\description{
+  Given a month, day, and year, returns the number of days since
+  January 1, 1960.
+}
+\usage{
+mdy.date(month, day, year, nineteen = TRUE, fillday = FALSE,
+         fillmonth = FALSE)
+}
+\arguments{
+  \item{month}{vector of months.}
+  \item{day}{vector of days.}
+  \item{year}{vector of years.}
+  \item{nineteen}{if \code{TRUE}, year values between 0 and 99 are
+    assumed to be in the 20th century A.D.; otherwise, if \code{FALSE},
+    they are assumed to be in the 1st century A.D.}
+  \item{fillday}{if \code{TRUE}, then missing days are replaced with
+    15.}
+  \item{fillmonth}{if \code{TRUE}, then a missing month causes the
+    month and day to be set to 7/1.}
+}
+\value{
+  a vector of Julian dates.
+}
+\details{
+  The date functions are particularly useful in computing time spans,
+  such as number of days on test, and similar functions can be found in
+  other statistical packages.  The baseline date of Jan 1, 1960 is, of
+  course, completely arbitrary (it is the same one used by SAS).
+
+  The \code{fillday} and \code{fillmonth} options are perhaps useful
+  only to the author and a very few others: we sometimes deal with
+  patients whose birth date was in the 1800's, and only the month or
+  even only the year is known.  When the interval is greater than 80
+  years, a filler seems defensible.
+}
+\references{
+  Press, W. H., Teukolsky, S. A., Vetterling, W. T., and Flannery,
+  B. P. (1992).
+  \emph{Numerical Recipes: The Art of Scientific Computing (Second
+    Edition)}.
+  Cambridge University Press.
+
+}
+\seealso{
+  \code{\link{date.mmddyy}}, 
+  \code{\link{date.ddmmmyy}},
+  \code{\link{date.mmddyyyy}}
+}
+\examples{
+mdy.date(3, 10, 53)
+xzt <-1:10
+xzy <- as.date(xzt)
+test <- data.frame(x = xzt, date = xzy)
+summary(test)
+}
+\keyword{chron}
--- date-1.2.32.orig/date/src/char_date.c
+++ date-1.2.32/date/src/char_date.c
@@ -0,0 +1,141 @@
+/*
+ * Tear down a date string into its component parts
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+char *id();
+
+void
+char_date(n, order, cdate, month, day, year)
+    int  *n,
+    order[],			/* 1=year, 2=month, 3=day */
+    month[],
+    day[],
+    year[];
+    char *cdate[];
+
+{
+    register int i,k, ii;
+    register char *j;
+    register char *cc;
+    
+    int what[3];
+    int len;
+    char tdate[10];
+
+    for (i=0; i< *n; i++) {
+	cc = cdate[i];
+	for (j=cc; *j != '\0'; j++)  /* upper case to lower case */
+	    if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", *j) !=NULL)
+		*j += 'a' - 'A';
+
+	/*
+	** If it is pure numeric, put in some delimiters based on
+	**  assumptions
+	*/
+	len = strlen(cc);
+	for (k=0; k<len; k++)
+	    if ((cc[k] < '0') || (cc[k] > '9')) break;
+	if (k>=len && (len>=5 && len<=8)) {
+	    if (len==5)
+		sprintf(tdate, "0%c/%c%c/%c%c", cc[0], cc[1], cc[2], cc[3],
+						cc[4]);
+	    else if (len==6)
+		sprintf(tdate, "%c%c/%c%c/%c%c", cc[0], cc[1], cc[2], cc[3],
+						 cc[4], cc[5]);
+	    else {
+		if (len==7) {
+		    for (ii=7; ii>0; ii--) cc[ii]= cc[ii-1];
+		    cc[0] = '0';
+		    }
+		if (order[0]==1)
+		    sprintf(tdate, "%c%c%c%c/%c%c/%c%c", cc[0], cc[1], cc[2],
+				    cc[3], cc[4], cc[5], cc[6], cc[7]);
+		else if (order[1]==1)
+		    sprintf(tdate, "%c%c/%c%c%c%c/%c%c", cc[0], cc[1], cc[2],
+				    cc[3], cc[4], cc[5], cc[6], cc[7]);
+		else
+		    sprintf(tdate, "%c%c/%c%c/%c%c%c%c", cc[0], cc[1], cc[2],
+				    cc[3], cc[4], cc[5], cc[6], cc[7]);
+		}
+	    cc = tdate;
+	    }
+
+	cc = id(cc, what, 0);
+	cc = id(cc, what, 1);
+	cc = id(cc, what, 2);
+	if (*cc != '\0')  what[2] =0;
+
+	if (what[0] <0) {
+	    month[i] = -1*what[0];
+	    day[i]   =  what[1];
+	    year[i]  =  what[2];
+	    }
+	else if (what[1] <0) {
+	    month[i] = -1*what[1];
+	    day[i]   =  what[0];
+	    year[i]  =  what[2];
+	    }
+	else for (k=0; k<3; k++) {
+	    switch (order[k]) {
+		case 1: year[i] = what[k]; break;
+		case 2: month[i]= what[k]; break;
+		case 3: day[i]  = what[k]; break;
+		}
+	     }
+	}
+    }
+
+
+char *
+id(str, array, k)
+    char *str;
+    int  array[];
+    int  k;
+{
+    register int i;
+    register char *j;
+
+    /*skip any delimiters (leading blanks are always ok) */
+    while (*str==' ') str++;
+    if (k>0)
+	if (strchr(" -/,", *str) !=NULL) str++;
+    while (*str==' ') str++;
+
+    if (*str=='\0') {
+	array[k]=0;
+	return(str);
+	}
+
+    if (strchr("0123456789", *str) ==NULL) {
+	if      (strstr(str, "jan")==str) array[k] = -1;
+	else if (strstr(str, "feb")==str) array[k] = -2;
+	else if (strstr(str, "mar")==str) array[k] = -3;
+	else if (strstr(str, "apr")==str) array[k] = -4;
+	else if (strstr(str, "may")==str) array[k] = -5;
+	else if (strstr(str, "jun")==str) array[k] = -6;
+	else if (strstr(str, "jul")==str) array[k] = -7;
+	else if (strstr(str, "aug")==str) array[k] = -8;
+	else if (strstr(str, "sep")==str) array[k] = -9;
+	else if (strstr(str, "oct")==str) array[k] = -10;
+	else if (strstr(str, "nov")==str) array[k] = -11;
+	else if (strstr(str, "dec")==str) array[k] = -12;
+	else array[k] =0;
+
+	/* pass over the rest of the string */
+	while( *str!= '\0' && strchr("januaryfebmrchpilgstovd", *str)!=NULL)
+		 str++;
+	}
+    else { /*is a number */
+	i =0;
+	while (*str!= '\0' &&  (j=strchr("0123456789", *str)) !=NULL) {
+	    str++;
+	    i = (10*i) +(*j - '0');
+	    }
+	array[k] = i;
+	}
+
+    return(str);
+    }
--- date-1.2.32.orig/date/inst/CITATION
+++ date-1.2.32/date/inst/CITATION
@@ -0,0 +1,33 @@
+citHeader("To cite in publications use:")
+
+## R >= 2.8.0 passes package metadata to citation().
+if(!exists("meta") || is.null(meta)) meta <- packageDescription("date")
+year <- sub("-.*", "", meta$Date)
+note <- sprintf("R package version %s.", meta$Version)
+
+citEntry(entry = "Manual",
+	 title = "date: Functions for handling dates",
+	 author = personList(
+           person("Terry", "Therneau",
+                  email = "therneau@mayo.edu"),
+           person("Thomas", "Lumley",
+                  email = "thomas@biostat.washington.edu"),
+           person("Kjetil", "Halvorsen",
+                  email = "khal@alumni.uv.es"),
+           person("Kurt", "Hornik",
+                  email = "Kurt.Hornik@R-project.org")),
+         year = year,
+	 note = {
+             paste(note,
+                   "S original by Terry Therneau,",
+		   "R port by Thomas Lumley, Kjetil Halvorsen,",
+		   "and Kurt Hornik.")
+         },
+	 url = "http://CRAN.R-project.org/package=date",
+	 textVersion = {
+             paste("Terry Therneau and Thomas Lumley",
+	           "and Kjetil Halvorsen and Kurt Hornik",
+	           sprintf("(%s).", year),
+		   "date: Functions for handling dates.",
+                   note)
+         })
