Am 30.09.21 um 16:13 schrieb Sven Schreiber:
Hi Artur (and everybody who's interested),
Hi Sven
I'm trying to leverage your calendar-related package and have
some
questions, especially about the function date_to_iso8601. First of all,
it would be useful if the doc explained a little bit more what's
actually supported. Internally the function uses the built-in strptime
and so on, so maybe it would be enough to refer to gretl's function
reference for that.
Good idea. I've added a sentence on that.
Then, I'm observing that the result for
date_to_iso8601("1984", "%Y")
is: 19831231. Is this a bug? I would have expected 19840101.
Looks like a bug on the gretl side to me.
Very similar issue here
<hansl>
eval strftime(strptime("202105", "%Y%m"), "%Y%m%d")
# 20210430
</hansl
Next, my feature request would be to support other date
specifications
used by gretl as well, such as for quarterly data things like "1974:3".
(It does work with such monthly specifications, apart from an apparent
bug similar to the one above.) I'm aware that quarterly data isn't
covered by ISO8601.
Mmmhhh, the problem is that "1974:3" is not standard at all. I wanted to
support standard formats as supported by strptime. See here:
https://man7.org/linux/man-pages/man3/strptime.3.html
Your request, which is totally valid of course, looks special to me.
Instead of augmenting the date_to_iso8601() function, I am wondering
whether such non-standard formats should be handled by another function:
"1994:1"
"1994:12"
"1994Q1"
"1994q1"
"1994M1"
"1994m1"
Before proceeding with this, Sven: What's the actual value-added of
having a function which needs to handle a format such as "1994:1" if
"199401" is already supported?
Best,
Artur