sfeed.c: support / as a year/month/day separator - sfeed - RSS and Atom parser
HTML git clone git://git.codemadness.org/sfeed
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 5f373b2b7aed3f569dc97c2c42aab2aa6f3324bf
DIR parent c658cf92deeca62991057d1e4e2fb8b94a2d64df
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Nov 2024 19:59:03 +0100
sfeed.c: support / as a year/month/day separator
Using this separator is not in the standard and actually incorrect, because ISO
8601-1 specifies this for date periods/ranges.
However since date ranges are not supported in RSS/Atom feeds anyway and do not
make sense this separator can be supported without breaking anything.
If an ISO8601 date range would be used it will still use the first parsed date.
Diffstat:
M sfeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/sfeed.c b/sfeed.c
@@ -645,7 +645,7 @@ parsetime(const char *s, long long *tp)
}
va[vi] = v;
- if ((vi < 2 && *s == '-') ||
+ if ((vi < 2 && (*s == '-' || *s == '/')) ||
(vi == 2 && (*s == 'T' || *s == 't' || ISSPACE((unsigned char)*s))) ||
(vi > 2 && *s == ':'))
s++;