diff liboctave/oct-time.cc @ 3736:ac4609ffc702

[project @ 2000-11-16 17:25:34 by jwe]
author jwe
date Thu, 16 Nov 2000 17:25:35 +0000
parents c73bea82af94
children 7da18459c08b
line wrap: on
line diff
--- a/liboctave/oct-time.cc
+++ b/liboctave/oct-time.cc
@@ -97,6 +97,20 @@
 #endif
 }
 
+// From the mktime() manual page:
+//
+//     The  mktime()  function converts a broken-down time structure,
+//     expressed as local time, to calendar time representation.
+//
+//     <snip>
+//
+//     If structure members are outside  their	legal interval, they
+//     will be normalized (so that, e.g., 40 October is changed into
+//     9 November).
+//
+// So, we no longer check limits here.
+
+#if 0
 #define DEFINE_SET_INT_FIELD_FCN(f, lo, hi) \
   octave_base_tm& \
   octave_base_tm::f (int v) \
@@ -109,6 +123,16 @@
  \
     return *this; \
   }
+#else
+#define DEFINE_SET_INT_FIELD_FCN(f, lo, hi) \
+  octave_base_tm& \
+  octave_base_tm::f (int v) \
+  { \
+    tm_ ## f = v; \
+ \
+    return *this; \
+  }
+#endif
 
 DEFINE_SET_INT_FIELD_FCN (usec, 0, 1000000)
 DEFINE_SET_INT_FIELD_FCN (sec, 0, 61)