Esqarrouth / EZSwiftExtensions

:smirk: How Swift standard types and classes were supposed to work.
MIT License
3k stars 381 forks source link

Overloaded -timePassed method with language agnostic implementation #486

Closed 110100110101 closed 6 years ago

110100110101 commented 6 years ago

The overload of the method -timePassed returns an enum of TimePassed. Instances of TimePassed can be .year(int), .month(int), .day(int), .hour(int), .minute(int), .second(int), and now.

Original implementation of the -timePassed method returns a string eg. 5 seconds ago, 13 years ago. It is really convenient for the consumer of this method, if the target build is on english, but it is really cumbersome if the target is non-english builds.

Checklist

EZSwiftExtensionsBot commented 6 years ago
3 Messages
:book: Executed 203 tests, with 0 failures (0 unexpected) in 5.299 (5.741) seconds
:book: Executed 188 tests, with 0 failures (0 unexpected) in 4.432 (4.625) seconds
:book: Executed 125 tests, with 0 failures (0 unexpected) in 4.064 (4.142) seconds

Generated by :no_entry_sign: Danger

codecov-io commented 6 years ago

Codecov Report

Merging #486 into master will increase coverage by 1.11%. The diff coverage is 97.87%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #486      +/-   ##
=========================================
+ Coverage   43.09%   44.2%   +1.11%     
=========================================
  Files          50      51       +1     
  Lines        2265    2312      +47     
=========================================
+ Hits          976    1022      +46     
- Misses       1289    1290       +1
Impacted Files Coverage Δ
Sources/DateExtensions.swift 96.77% <100%> (+0.47%) :arrow_up:
Sources/TimePassed.swift 96.29% <96.29%> (ø)

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 4536c10...2b301d4. Read the comment docs.