Question: Are there any built on functions that can be used on a data frame object to generate variables on a class `Date` time series to create day of the Week, Month, Year, Week of the Year, etc in R?

The `weekdays`, `months`, `quarters`, functions in the base package generate text output, looking for numerical output to denote that 3/5/2012, for example, is a Friday, 3rd day of the month, 1 week of the month, and the 63 day of the year, etc.

Answer: 
You get a few of those just from `POSIXlt`, with its weird convention. Year needs to 1900,
month is on the 0 to 11 range -- but you do get weekday and day-of-the-year.

```
R> dd <- as.Date("2012-05-03")
R> as.POSIXlt(dd)
[1] "2012-05-03 UTC"

```

Then

```
R> unclass(as.POSIXlt(dd))
$sec
[1] 0

$min
[1] 0

$hour
[1] 0

$mday
[1] 3

$mon
[1] 4

$year
[1] 112

$wday
[1] 4

$yday
[1] 123

$isdst
[1] 0

attr(,"tzone")
[1] "UTC"
R> 

```
You can use the `lubridate` package to do a lot with dates. 

From the help file: *Lubridate provides tools that make it easier to parse and manipulate dates.* 

For example:

```
> library(lubridate)
> d <- today()
> d
[1] "2014-04-29"
> day(d)
[1] 29
> month(d)
[1] 4
> year(d)
[1] 2014
> week(d)
[1] 18
> weekdays(d)
[1] "Tuesday"
> days_in_month(d)
Apr 
 30 

```

I prefer it to the built-in functions because it has a lot of date splicing, casting and arithmetic functions.