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

Added Year, Month, Week feature #13

Merged
merged 3 commits into from
Apr 27, 2023
Merged

Conversation

lhengl
Copy link
Contributor

@lhengl lhengl commented Jan 26, 2023

ADDITION

  • Added Year class
  • Added Month class
  • Added Week class

UPDATES

  • Updated date to support Year, Month, and Week
  • Updated extensions to support Year, Month, and Week
  • Added DateTime extension methods to mirror Date

UNIT TESTS

  • added month_test.dart
  • added week_test.dart
  • added year_test.dart

ADDITION
- Added Year class
- Added Month class
- Added Week class

UPDATES
- Updated date to support Year, Month, and Week
- Updated extensions to support Year, Month, and Week
- Added DateTime extension methods to mirror Date

UNIT TESTS
- added month_test.dart
- added week_test.dart
- added year_test.dart
@lhengl
Copy link
Contributor Author

lhengl commented Jan 26, 2023

Hi Andrew,

As per #12 , I've been updating the package and using this code for a while on a local repository to work with individual units of time separately in a calendar app (year, month, week). I thought I'd share it with the community.

As per #12 I've added test cases as per your request.

Happy to discuss these new features with you, if you have any questions.

Heng.

@codecov
Copy link

codecov bot commented Jan 29, 2023

Codecov Report

Patch coverage: 93.70% and project coverage change: +6.63 🎉

Comparison is base (6113c78) 89.71% compared to head (04c0558) 96.35%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #13      +/-   ##
==========================================
+ Coverage   89.71%   96.35%   +6.63%     
==========================================
  Files           7       11       +4     
  Lines         350      795     +445     
==========================================
+ Hits          314      766     +452     
+ Misses         36       29       -7     
Impacted Files Coverage Δ
lib/src/extensions.dart 87.50% <87.03%> (-12.50%) ⬇️
lib/src/month.dart 91.56% <91.56%> (ø)
lib/src/year.dart 96.03% <96.03%> (ø)
lib/src/week.dart 96.51% <96.51%> (ø)
lib/src/date.dart 99.36% <100.00%> (+0.13%) ⬆️
lib/src/date_time_range.dart 100.00% <100.00%> (ø)
lib/src/time.dart 100.00% <100.00%> (+4.14%) ⬆️

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@AndrewPiterov
Copy link
Owner

Hi Heng,

Thanks for contribution and new features.

Let's add some more unit tests especially for extensions and time_range.

You can check locally which functions are not tested by commands below:

brew install lcov
flutter test --coverage
genhtml coverage/lcov.info -o coverage/html
open coverage/html

Thank you 🙏

- Included additional test to meet coverage
@lhengl
Copy link
Contributor Author

lhengl commented Apr 5, 2023

Hi @AndrewPiterov,

I finally got the time to write the additional tests (there were a lot, took me a whole weekend...). I added more tests for older features as well to qualify for the test coverage as per your request.

Hope you can approve. Cheers!

Heng.

@AndrewPiterov AndrewPiterov merged commit 446c0f4 into AndrewPiterov:dev Apr 27, 2023
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.

2 participants