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

How to parse date with a given format? #289

Closed
sohailalam2 opened this issue Jul 30, 2018 · 4 comments
Closed

How to parse date with a given format? #289

sohailalam2 opened this issue Jul 30, 2018 · 4 comments

Comments

@sohailalam2
Copy link

This works pretty well in momentjs

moment('27/08/2018', 'DD/MM/YYYY')

How can we make it work in dayjs?

This fails with the following error message -

dayjs('27/08/2018', 'DD/MM/YYYY')
TypeError: Cannot create property 'date' on string 'DD/MM/YYYY'
@kyleoliveiro
Copy link

Any update on this? Pretty essential feature for people outside the US.

@subpx
Copy link

subpx commented Aug 20, 2018

Agree that this is needed. Do a lot of work with dates and would not move from moment without this feature. Lib looks nice.

@prantlf
Copy link
Contributor

prantlf commented Sep 12, 2018

This has been already requested as #136.

@iamkun
Copy link
Owner

iamkun commented Feb 2, 2019

🎉 CustomParseFormat plugin is supported and included in version 1.8.0 🎉

The release is available on:

@iamkun iamkun closed this as completed Feb 2, 2019
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

5 participants