Closed jantimon closed 4 years ago
From the htl-spec for date formatting:
https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#1222-dates
d - Day in month. Variants: dd dd - Day in month with leading zero
However @adobe/htlengine is using momentjs for date parsing and momentjs is using a different syntax:
@adobe/htlengine
momentjs
https://momentjs.com/docs/#/displaying/format/
d - Day of week dd - `Su Mo ... Fr Sa`
A good solution might be to switch from momentjs to date-fns which is following a format similar to htl:
date-fns
https://date-fns.org/v2.9.0/docs/format
Day of month | d | 1, 2, ..., 31 | | dd | 01, 02, ..., 31 | Day of year | D | 1, 2, ..., 365, 366 | 9 | Do | 1st, 2nd, ..., 365th, 366th | 7 | DD | 01, 02, ..., 365, 366 | 9 | DDD | 001, 002, ..., 365, 366 | | DDDD | ... | 3
:tada: This issue has been resolved in version 4.0.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Cool nice 👍
From the htl-spec for date formatting:
https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#1222-dates
However
@adobe/htlengine
is usingmomentjs
for date parsing andmomentjs
is using a different syntax:https://momentjs.com/docs/#/displaying/format/
A good solution might be to switch from
momentjs
todate-fns
which is following a format similar to htl:https://date-fns.org/v2.9.0/docs/format