You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current fmtDate function uses the regex /\{([a-z]+)\}|[^\{]+/yi
Which is used to match {YYYY}, {M}/{D}\n{YYYY}, etc...
However, passing it something with an open parenthesis without letters will discard the rest of the string.
Eg: {YYYY}{1}{M}, {YYYY}{{M} and ``{YYYY}{}{M}will be translated as{YYYY}`.
So the question is: What is the intended format for dates?
The text was updated successfully, but these errors were encountered:
the format is simply to enclose any key strings [1] in {}. i have never seen a literal { inside of a formatted date string, so i'm not particularly interested in handling what i consider an extreme edge case.
i'm pretty certain we can just change the regex to /gi instead of /yi for this application since exec continues where it left off anyways, and the regex matches both cases - formatting tokens and "everything else". initial testing shows no issues. we can also drop stickyRegExp: false from https://github.com/leeoniya/uPlot/blob/master/rollup.config.js in this case.
Related to #139...
The current
fmtDate
function uses the regex/\{([a-z]+)\}|[^\{]+/yi
Which is used to match
{YYYY}
,{M}/{D}\n{YYYY}
, etc...However, passing it something with an open parenthesis without letters will discard the rest of the string.
Eg:
{YYYY}{1}{M}
,{YYYY}{{M}
and ``{YYYY}{}{M}will be translated as
{YYYY}`.So the question is: What is the intended format for dates?
The text was updated successfully, but these errors were encountered: