you-dont-need / You-Dont-Need-Momentjs

List of functions which you can use to replace moment.js + ESLint Plugin
MIT License
13.27k stars 318 forks source link

add luxon for brief comparison #56

Closed cylim closed 5 years ago

cylim commented 5 years ago

For the detailed comparison, need to understand how we should show for the output: #55

This merge request is requested by #26

cylim commented 5 years ago

Test failed due to it is using a different alpha version of date-fns, should we fix the version until the official release?

cht8687 commented 5 years ago

@cylim in our project, we use 2.X api from date-fns.

cht8687 commented 5 years ago

@cylim in our project, we use 2.X api from date-fns.

cht8687 commented 5 years ago

@cylim We are using 2.X of date-fns.

cylim commented 5 years ago

@cht8687 currently, date-fns:2.x is in alpha release, that's the reason for the test fail, do you recommend to fix a version or to fix the unit test along the journey?

cylim commented 5 years ago

@cht8687 currently, date-fns:2.x is in alpha release, that's the reason for the test fail, do you recommend to fix a version or to fix the unit test along the journey?

cylim commented 5 years ago
screenshot 2018-10-22 at 21 46 41

Doesn't sure what is the best way to test this. According to date-fns docs, the way they format it is 1 month, 1 day, 1 year instead of a month, a day, a year (momentjs is using).

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 150


Totals Coverage Status
Change from base Build 147: 0.0%
Covered Lines: 43
Relevant Lines: 43

💛 - Coveralls
coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 151


Totals Coverage Status
Change from base Build 147: 0.0%
Covered Lines: 43
Relevant Lines: 43

💛 - Coveralls
cylim commented 5 years ago

@cht8687 fix the relative time to 3 months. It is not a bug for the test case, but a different library decided to present the relative time in different ways.

date-fns

1 month, 1 day, 1 year

moment, dayjs

a month, a day, a year