From bug-request at octave dot org Tue Jan 3 12:37:37 2006 Subject: etime in the new year From: Keith Goodman To: bug at octave dot org Date: Tue, 3 Jan 2006 12:29:16 -0600 The function etime (elapsed time in seconds) returns an error when you compare times with different years. From the code if (t1 (1) != t0 (1)) error ("etime: can't handle timings over year boundaries yet"); endif Is that because it's painful to deal with leap years? What's the best fix? (1) Write a separate function to find if a year is a leap year. (2) Determine if a year is a leap year inside etime. (3) Bring over datenum from octave-forge and modify it to handle leap years and then use it for year, month, and day differences but not fractional parts of days. ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------