Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format includes escape quote when followed by xxx #136

Closed
Valerionn opened this issue Sep 7, 2021 · 0 comments
Closed

format includes escape quote when followed by xxx #136

Valerionn opened this issue Sep 7, 2021 · 0 comments

Comments

@Valerionn
Copy link

import { format } from "date-fns"; console.log(format(d, "dd.MM.yyyy HH:mm 'UTC'xxx"));
returns something like 26.09.2018 10:07 UTC+02:00

However, when using format from date-fns-tz, i.e.
import { format as formatTZ } from "date-fns-tz"; console.log(formatTZ(d, "dd.MM.yyyy HH:mm 'UTC'xxx"));
then the second ' is included in the response, e.g. 26.09.2018 10:07 UTC'+02:00

This only seems to happen if the quotation mark is directly followed by x or z - other things like 'UTC'yyyy work without a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant