Convert a vector to 'yearmonth' using the specified field descriptor
dp_to_yearmonth(x, fielddescriptor = list(), ...)
Will return an Date
vector with fielddescriptor
added as the
'fielddescriptor' attribute. The dates will be the first of the given month.
Therefore, a 'yearmonth' "2024-05" is translated to a date "2024-05-01".
the vector to convert.
the field descriptor for the field.
passed on to other methods.
When fielddescriptor
is missing a default field descriptor is
generated.
Valid formats are "YYYY-MM" or "YYYYMM". When x is numeric or integer, it is assumed that it was a yearmonth in the format "YYYYMM" that was accidentally converted to numeric format.