changeset 22746:bc9b0f75859e stable

datenum.m: Treat months > 14 correctly (bug #49570). * datenum.m: Treat months > 14 correctly.
author Markus Mützel <markus.muetzel@gmx.de>
date Wed, 09 Nov 2016 18:41:09 +0100
parents a8e56d29b34d
children fb76e570466b e6bf4f8920d3
files scripts/time/datenum.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/time/datenum.m	Wed Nov 09 12:33:26 2016 -0500
+++ b/scripts/time/datenum.m	Wed Nov 09 18:41:09 2016 +0100
@@ -140,7 +140,7 @@
 
   ## Set start of year to March by moving Jan. and Feb. to previous year.
   ## Correct for months > 12 by moving to subsequent years.
-  year += fix ((month-14)/12);
+  year += ceil ((month-14)/12);
 
   ## Lookup number of days since start of the current year.
   if (numel (month) == 1 || numel (day) == 1)