-
Notifications
You must be signed in to change notification settings - Fork 1
/
Math.Date.html
98 lines (72 loc) · 2.51 KB
/
Math.Date.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Date Class</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="R.css">
</head><body>
<table width="100%" summary="page for Dates"><tr><td>Dates</td><td align="right">R Documentation</td></tr></table>
<h2>Date Class</h2>
<h3>Description</h3>
<p>Description of the class <code>"Date"</code> representing calendar dates.
</p>
<h3>Usage</h3>
<pre>
## S3 method for class 'Date'
summary(object, digits = 12, ...)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>object</code></td>
<td>
<p>An object summarized.</p>
</td></tr>
<tr valign="top"><td><code>digits</code></td>
<td>
<p>Number of significant digits for the computations.</p>
</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
<p>Further arguments to be passed from or to other methods.</p>
</td></tr>
</table>
<h3>Details</h3>
<p>Dates are represented as the number of days since 1970-01-01, with
negative values for earlier dates. They are always printed
following the rules of the current Gregorian calendar, even though
that calendar was not in use long ago (it was adopted in 1752 in
Great Britain and its colonies).
</p>
<p>It is intended that the date should be an integer, but this is not
enforced in the internal representation. Fractional days will be
ignored when printing. It is possible to produce fractional days via
the <code>mean</code> method or by adding or subtracting (see
<code>Ops.Date</code>).
</p>
<p>The print methods respect <code>options("max.print")</code>.
</p>
<h3>See Also</h3>
<p><code>Sys.Date</code> for the current date.
</p>
<p><code>Ops.Date</code> for operators on <code>"Date"</code> objects.
</p>
<p><code>format.Date</code> for conversion to and from character strings.
</p>
<p><code>axis.Date</code> and
<code>hist.Date</code> for plotting.
</p>
<p><code>weekdays</code> for convenience extraction functions.
</p>
<p><code>seq.Date</code>, <code>cut.Date</code>,
<code>round.Date</code> for utility operations.
</p>
<p><code>DateTimeClasses</code> for date-time classes.
</p>
<h3>Examples</h3>
<pre>## Not run:
(today <- Sys.Date())
format(today, "%d %b %Y") # with month as a word
(tenweeks <- seq(today, length.out=10, by="1 week")) # next ten weeks
weekdays(today)
months(tenweeks)
as.Date(.leap.seconds)
## End(Not run)</pre>
</body></html>