Description Usage Arguments Value Note
Utilities to manipulate Date objects.
1 2 3 4 5 6 7 8 9 | .GetWeekdays(x)
.GetWeekIndex(x)
.GetWeekNumbers(x)
.GetLastDayOfWeek(x, last.day = 7L)
.GetLastDayOfMonth(x)
|
x |
a Date object (vector). |
last.day |
(integer) number of the day to translate the date to. Monday is 1, Sunday is 7. |
.GetWeekdays
: Indicator for weekday, given a
date: an integer vector of the same length as x
, indicating
the number of the weekday, Monday=1, Tuesday=2, ..., Sunday=7.
.GetWeekIndex
: An indicator for an 'absolute' week number:
an integer vector of the same length as x
, indicating the week
number, composed of the 4-digit year and the number of the week within
the year.
.GetWeekNumbers
: Indicators for week numbers within the
year: an integer vector of the same length as 'x', indicating the week
number, 0 .. 53.
code.GetLastDayOfWeek: Translates the given date(s) to the date of the last day of the corresponding week: a date object of the same length as 'x', with the corresponding dates shifted to the next (future) day given by 'last.day'.
.GetLastDayOfMonth
: Translates the given date(s) to the last
day of the month of the corresponding month. A date object of the same
length as 'x', with the corresponding dates shifted to the last day of
the month.
As a convention, a week starts on Monday and ends on Sunday.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.