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

Created DaysInYear plugin #455

Closed
wants to merge 5 commits into from

Conversation

naulacambra
Copy link
Contributor

Created daysInYear plugin, which adds daysInYear() API method to retrieve how many days has the dayjs instance year.

@codecov-io
Copy link

codecov-io commented Jan 16, 2019

Codecov Report

❗ No coverage uploaded for pull request base (dev@97a6088). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff          @@
##             dev   #455   +/-   ##
====================================
  Coverage       ?   100%           
====================================
  Files          ?     53           
  Lines          ?    473           
  Branches       ?     74           
====================================
  Hits           ?    473           
  Misses         ?      0           
  Partials       ?      0
Impacted Files Coverage Δ
src/constant.js 100% <ø> (ø)
src/index.js 100% <100%> (ø)
src/plugin/daysInYear/index.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97a6088...b6797e2. Read the comment docs.

@iamkun
Copy link
Owner

iamkun commented Jan 16, 2019

It's not that useful I think. Pending.

@naulacambra
Copy link
Contributor Author

It's not that useful I think. Pending.

It is not 😅 but there is this lib, Dayspan Vuetify which relies on momentjs. I want to use this lib, and at the same time, keep dayjs as a momentjs substitute.

Using a webpack alias, I can "deceive" dayspan-vuetify to load dayjs instead of momentjs, but there are some functions that are needed to work, thats why I'm creating this plugins, since I've already made the code for my project.

@iamkun
Copy link
Owner

iamkun commented Jan 16, 2019

Agreed that we should add the missing functions to dayjs (core / plugin ).

But it seems momentjs does not have DaysInYear either?

@naulacambra
Copy link
Contributor Author

But it seems momentjs does not have DaysInYear either?

My bad, you're right. It's a method needed for weeksInYear (plugin I'll create after we resolve #456), and I blindly created this.

Closing this PR

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

Successfully merging this pull request may close these issues.

3 participants