R/lt.R

`lt` <-
function (hour=NULL,minute=0,second=0,epoch=Sys.time(),length=1,by=1) 
{
	if (is.null(hour)) {
				daylt = as.POSIXlt(epoch);
				hour = daylt$hour;
				minute = daylt$min;
				second = daylt$sec;
				}

	res = hour + minute/60 + second/3600;
	res = res %% 24;

	res = seq(res,length=length,by=by);

	class(res) = c("lt","time");
	return(res);

}

Try the moonsun package in your browser

Any scripts or data that you put into this service are public.

moonsun documentation built on May 29, 2017, 12:17 p.m.