On Mon, 07 Apr 2014, Christofer Bogaso writes:
> Hi,
>
> Given a month name, I am looking for some script to figure out, what is the
> date for 3rd Wednesday. For example let say I have following month:
>
> library(zoo)
> Month <- as.yearmon(as.Date(Sys.time()))
>
> I need to answer: What is the
On Mon, Apr 7, 2014 at 1:49 PM, Christofer Bogaso
wrote:
> Hi,
>
> Given a month name, I am looking for some script to figure out, what is the
> date for 3rd Wednesday. For example let say I have following month:
>
> library(zoo)
> Month <- as.yearmon(as.Date(Sys.time()))
>
> I need to answer: Wha
On 07-Apr-2014 17:49:09 Christofer Bogaso wrote:
> Hi,
> Given a month name, I am looking for some script to figure out,
> what is the date for 3rd Wednesday. For example let say I have
> following month:
>
> library(zoo)
> Month <- as.yearmon(as.Date(Sys.time()))
>
> I need to answer: What is th
Something like:
# the third Wednesday
m <- as.Date("2014-04-01")
format(m+which(format(m+0:30,"%a") == "Wed")[3]-1, "%a %b %d")
# or eg. all Tuesdays
format(m+which(format(m+0:30,"%a") == "Tue")-1, "%a %b %d")
# or eg. the last Friday
wd <- which(format(m+0:30,"%a") == "Fri")-1
format(m+wd[lengt
Hi,
Given a month name, I am looking for some script to figure out, what is the
date for 3rd Wednesday. For example let say I have following month:
library(zoo)
Month <- as.yearmon(as.Date(Sys.time()))
I need to answer: What is the date for 3rd Wednesday of 'Month'?
Really appreciate for any po
5 matches
Mail list logo