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

Replace moment.js by date-fns #2

Closed
hiendv opened this issue Aug 28, 2017 · 3 comments
Closed

Replace moment.js by date-fns #2

hiendv opened this issue Aug 28, 2017 · 3 comments
Labels

Comments

@hiendv
Copy link

hiendv commented Aug 28, 2017

Reasons:

  • Immutability
  • Tree-shaking / Bundle size
  • Clean API

Related:

@taquy
Copy link
Owner

taquy commented Aug 28, 2017

Old code:
created: new Moment(new Date(this.info.created_at).valueOf()).format("LTS ll"),
updated: new Moment(new Date(this.info.updated_at).valueOf()).format("LTS ll")

Updated code:
created: DateFNS.format(DateFNS.parse(this.info.created_at), "hh:mm:ss A MMM Do YYYY"),
updated: DateFNS.format(DateFNS.parse(this.info.updated_at), "hh:mm:ss A MMM Do YYYY")

taquy pushed a commit that referenced this issue Aug 28, 2017
@taquy taquy closed this as completed Aug 28, 2017
@hiendv hiendv reopened this Aug 28, 2017
@taquy taquy added bug and removed enhancement labels Aug 28, 2017
taquy pushed a commit that referenced this issue Aug 28, 2017
@taquy taquy removed the bug label Aug 28, 2017
taquy pushed a commit that referenced this issue Aug 28, 2017
@hiendv
Copy link
Author

hiendv commented Aug 28, 2017

OK

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

No branches or pull requests

2 participants