Am 01.10.2021 um 15:23 schrieb Artur T.:
Hi
Am 30.09.21 um 23:03 schrieb Sven Schreiber:
> Maybe there's a case for using an integer arg similar to $pd here,
> allowing values 4 and 12.
Ah, good point. I've changed the signature to
<>
function scalar gdate_to_iso8601 (string date "Date string",
string frequency[null] "Frequency of
observation")
</>
Thus, the "frequency" string parameter is optional. If not passed, the
frequency string is determined by the underlying periodicity as
retrived by the $pd accessor.
It's good to give the user the possibility to override the default. Note
that $pd has a rather different meaning in a panel dataset. So even if
you declare the panel-time to be quarterly, $pd will give you the total
time dimension length instead. (Which IMHO is quite confusing, but it is
clearly documented.) So I think internally the function must not use $pd
if $datatype gives you 3 (panel data code) [or 0 (no data)].
But to avoid misunderstanding: The idea was that (perhaps) the frequency
arg might be changed from string to integer. But it's clearly a matter
of taste as well.
thanks
sven