File: as_weekday.Rd

package info (click to toggle)
r-cran-clock 0.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,856 kB
  • sloc: cpp: 19,564; sh: 17; makefile: 2
file content (32 lines) | stat: -rw-r--r-- 828 bytes parent folder | download
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/weekday.R
\name{as_weekday}
\alias{as_weekday}
\title{Convert to a weekday}
\usage{
as_weekday(x, ...)
}
\arguments{
\item{x}{\verb{[object]}

An object to convert to a weekday. Usually a sys-time or naive-time.}

\item{...}{These dots are for future extensions and must be empty.}
}
\value{
A weekday.
}
\description{
\code{as_weekday()} converts to a weekday type. This is normally useful for
converting to a weekday from a sys-time or naive-time. You can use this
function along with the \emph{circular arithmetic} that weekday implements to
easily get to the "next Monday" or "previous Sunday".
}
\examples{
x <- as_naive_time(year_month_day(2019, 01, 05))

# This is a Saturday!
as_weekday(x)

# See the examples in `?weekday` for more usage.
}