search for: enddat

Displaying 20 results from an estimated 65 matches for "enddat".

Did you mean: enddate
2006 May 07
1
Anyone care for a braindump?
I have this problem with records that have to be alligned on end- and startdate. I came up with the following. but am not convinced that this is the best way to tackle this problem. Anyone care for a braindump? def head_to_tail # Remove days that have startdate >= self.startdate AND enddate <= self.enddate # # before after # # |=====| |=====| # <----|--|----> <---| |----> # # @days_inside_new_day = Day.find(:all, :conditions => [ "id != ? and child_id = ? and startdate >= ? and enddate <= ?&quo...
2006 Jul 26
8
change text_field_tag class
...artdateclass, :readonly => "readonly", :maxlength => "25"} ) %> <%= observe_field("startdate", :frequency => 0.5, :url => {:controller => ''booking'' , :action => ''startdateChanged'' }, :update => ''enddate'', :with => "''input=''+$(''startdate'').value ") %> </div> <div> <label for="enddate">Booking End Date</label><br /> <%= text_field_tag(''enddate'', @enddate, {:class => @enddat...
2006 Feb 08
6
can''t get date_select to work
...of date_select fields, the HTML looks fine, I can see the values submitted back to the server, but AR doesn''t pick them up from the hash in Booking.new(params[''booking'']). I''ve got a ''booking'' object with parameters product, startdate and enddate. HTML snippets: <select name="booking[startdate(1i)]">... <select name="booking[startdate(2i)]">... <select name="booking[startdate(3i)]">... In the view controller method I create a booking object and set startdate to Date.today+1, and enddate t...
2006 May 16
1
:conditions on has_one realationship
...I have linked the tables as shown:- class Membership < ActiveRecord::Base belongs_to :payment belongs_to :person end class Person < ActiveRecord::Base has_many :memberships has_one :active_membership, :class_name => ''Membership'', :order => ''enddate DESC'', :conditions => ''memberships.id is not null and memberships.enddate > now()'' end As I understand it I should be able to do a @people = Person.find :all, :include => :active_membership in my controller and it should find any records from the table p...
2012 Nov 02
2
Date format conversion from "2012-09-20" to "2012:09:20"
Hi R, How to get the range of values form startDate to lastDate as given below?. #***************************************************************** # Load historical data #****************************************************************** library('quantmod') endDate =Sys.Date() startDate = as.Date(endDate-30, order="ymd") dataspy = getSymbols("SPY", from = startDate, to=endDate, auto.assign = FALSE) lastDate=startDate+5 #subset first 5 days dataspy['startDate::lastDate'] print(dataspy) Thanks veepsirtt -- View this message i...
2006 Feb 06
4
Basic MVC in RoR question
Ok, Here''s my controller: def create trainingplan = Trainingplan.createplan(@params[:startdate], @params[:enddate], @params[:hoursperweek], @params[:programtype]) end My model is: class Trainingplan <ActiveRecord::Base def self.createplan(stardate, enddate, hoursperweek, programtype) stardate = startdate enddate = enddate hoursperweek = hoursperweek programtype = programtype end end...
2008 Nov 19
2
Exclude holidays in a subset of dates?
...ncounter a weekend or holiday. To do this, I thought the easiest way would be to create a TRUE/FALSE vector corresponding to each day where it is TRUE if a workday, and FALSE if a weekend or holiday. So far I have been able to do this for weekdays: startDate <- as.Date("2008-08-15") endDate <- as.Date("2008-09-15") AllDays <- seq(startDate, endDate, by="day") WorkDays <- ifelse(as.numeric(format(startDate+days-1, "%w"))%%6==0, FALSE, TRUE) But I'm a bit lost as to what to do for the holidays, for example "2008-09-01" is Labor Da...
2006 Jul 26
0
render :update do | page | to modify a css class string...
...rtdateclass, :readonly => "readonly", :maxlength => "25"} )%> <%= observe_field("startdate", :frequency => 0.5, :url => {:controller => ''booking'' , :action => ''startdateChanged'' }, :update => ''enddate'', :with => "''input=''+$(''startdate'').value ")%> </div> <div> <label for="enddate">Booking End Date</label><br /> <%= text_field_tag(''enddate'', @enddate, {:class => @end...
2006 May 03
0
allign records with start- and enddates
I have this model (Days), that has a start- end enddate. It has a belongs_to relationship with Child. So, one child can have many Days. If a new Day is added, the start- and enddates should all allign. Is there a plugin, or a ruby class that I could use to achieve this? -- Posted via http://www.ruby-forum.com/.
2004 Dec 21
1
Referencing a table''s fields.
...provide helper methods in my model class. I was confused that the class DOESN''T refer to its fields as instance variables. I merely had to type in the field names to be able to work with their data. Here''s an example: I have a "Chessgame" class with a begindate and an enddate. To get the number of hours that the game took, I wrote an "hours" method in the Chessgame class. I thought that i would reference the begindate and enddate field as instance variables, but this did not work. I had to write the code like this: -----------------------------------------...
2011 Mar 23
1
using R variables in RMySQL query
I have the following function myGetstockdataMySQL <- function(startdate, enddate, ticker) { con <- dbConnect(MySQL(), user="blahblah", password="blahblah", dbname="blahblah", host="localhost") rs <- dbGetQuery(con, "SELECT price.close FROM price INNER JOIN stocks ON stocks.stock_id=price.stock_ID WHERE (price.date_holding B...
2005 Jun 01
2
problem with chron scales in lattice
...o 2004 for the x axis in the plot below, but instead only a few of them appear, and in the wrong spots, as if the coordinate system has changed after finishing with the panel function. library(chron) library(lattice) # vertical grid lines at start of each year startdate <- "1/1/1992" enddate <- "1/1/2005" startdatetime <- chron(dates=startdate, times="00:00:00") enddatetime <- chron(dates=enddate, times="00:00:00") x.lines <- as.chron(seq.dates(startdate, enddate, by="years")) x.limits <- c(as.chron(startdate), as.chron(enddate)...
2017 Feb 13
1
LDAP problem
...usly This error suggests a problem with your certificate. If it used to work previously, then check it hasn't expired. openssl s_client -connect devsamba.lucas.ufes.br:636 copy-paste the certificate into a pem file, including begin/end lines openssl x509 -in mycert.pem -noout -enddate And check your root CA cert hasn't expired: openssl x509 -in /usr/local/samba/private/tls/cert.pem -noout -enddate I did the first command and I got this: openssl s_client -connect devsamba.lucas.ufes.br:636 socket: Connection refused connect:errno=111 Then I copy-paste the cert...
2006 Apr 25
1
Array of dates/times from time.now till nextweek
Hi, I would like to make @dates in my controller. I tried the following: startdate = Time.now enddate = startdate.next_week for enddate > startdate @dates << startdate startdate = startdate.tomorrow end But I get an errormessage when I check the syntax: "warning: useless use of a variable in void context" Anyone? Thanks! Steven. -- Posted via http://www.ruby-forum.co...
2010 Aug 29
1
calculations with dates
Hi, I have a data.frame with factors in columns like startdate enddate 27SEP2005 01JAN2006 How can I calculate the duration between those two dates and move this in a extra column in the data.frame. Thanks, André [[alternative HTML version deleted]]
2009 Feb 22
6
CHECK if param exists? please help
hi folks. i want to check if a param exists if not to set it to a default value for my date range filter. in my controller i have: @from_date = Date.strptime(params[:startdate],"%d/%m/%Y") @to_date = Date.strptime(params[:enddate],"%d/%m/%Y") @articles = @results.find(:all, :conditions => [ "created_at >= ? and created_at <=?",@from_date,@to_date], :order => ''created_at desc'', :page => {:size => 5, :current...
2007 Apr 03
2
Strange labels on plot with dates
...the default behavior of the axis labeling when plotting dates. I would expect something like 2001, 2002 or possibly Jan 01, Jan 02...Jan 06, but instead I only see Jan 01, Jan 01, Jan 01.... See the following example startdate <- strptime("2001-01-01",format="%Y-%m-%d") enddate <- strptime("2006-12-31",format="%Y-%m-%d") dates <- seq(startdate,enddate,by="month") daynr <- as.numeric(julian(dates,origin=dates[1])) yvar <- sin(daynr*2*pi/365) plot(yvar~dates,type='l') Cheers, Henrik -- Henrik Andersson Danish Meteoro...
2012 Apr 09
1
Creating a dummy variable
HI I want to create a dummy variable for a dataset which has various dates Eg I've one year data. The user can choose any date range startdate : 2012-01-01 enddate: 2012-02-01 startdate: 2012-06-01 enddate=2012-07-01 the columns of dataset= X ,Y ,date Thanks and re ----- Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/Creating-a-dummy-variable-tp4542150p4542150.html Sent from the R help mailing list a...
2012 Aug 01
4
how to calculate seasonal mean for temperatures
Hello everybody, I need to calculate seasonal means with temperature data for my work. I have 70 files coming from weather stations, which looks like this for example: startdate <- as.POSIXct("01/01/2006", format = "%d/%m/%Y") enddate <- as.POSIXct("05/01/2006", format = "%d/%m/%Y") date <- seq(from = startdate, to = enddate, by = "days",format = "%d/%m/%Y") DF <- data.frame(data=c(2.5,1.4,3.6,0.5,-1.2),date=date) With this daily data, I need to calculate seasonal means. I mean...
2017 Dec 18
2
Finding center of mass in a hydrologic time series
...on. The idea is this: for each unique water year (variable 'wyrs' in example below) in a 27 year continuous time series of daily values, find the date of the 'center of mass', and build a vector of those dates. Thanks, -Eric M library(EGRET) StartDate <- "1990-10-01" EndDate <- "2017-09-30" siteNumber <- "10310000" QParameterCd <- "00060" Daily <- readNWISDaily(siteNumber, QParameterCd, StartDate, EndDate) # Define 'center of mass' function com <- function(x) { match(TRUE, cumsum(x/sum(x)) > 0.5) - 1 } wy...