Displaying 1 result from an estimated 1 matches for "validate_tm".
Did you mean:
validate_op
2007 Mar 21
1
bug and patch: strptime first-of-month error in (possibly unsupported use of) "%j" format (PR#9577)
...-02-02"
# the full extent of R's taunting
strptime(1 + cumsum(c(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30)), "%j")
[1] NA NA NA NA NA NA NA NA NA NA NA
>
The problem is an edge-case comparison in datetime.c:glibc_fix(). This
generates a date like "Jan 32", which validate_tm() catches and NAs.
(Values of field tm->tm_yday start at 0, not 1.)
=================================================================================
PATCH:
--- R/src/main/datetime.c (revision 40860)
+++ R/src/main/datetime.c (working copy)
@@ -796,7 +796,7 @@
if(tm->tm_yday != NA_INTEG...