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

Basic units of measurement for Time #10

Closed
10 tasks done
jordanbrauer opened this issue Oct 9, 2017 · 2 comments
Closed
10 tasks done

Basic units of measurement for Time #10

jordanbrauer opened this issue Oct 9, 2017 · 2 comments

Comments

@jordanbrauer
Copy link
Owner

jordanbrauer commented Oct 9, 2017

Thanks @teunw for adding the basic time units via #35!

namespace UnitConverter\Unit\Time;

  • Millisecond = ms
  • Second = s
  • Hour = hr
  • Minute = min
  • Day = day
  • Month (31 days) = month
  • Microsecond = μs
  • Nanosecond = ns
  • Week = week
  • Year (365 days) = year
@teunw
Copy link

teunw commented Oct 11, 2017

I think it might be better to make the month and year units calculatable.
So giving the years to convert from/to would give different results based on leap years for instance.

@jordanbrauer
Copy link
Owner Author

jordanbrauer commented Oct 11, 2017

@teunw Great idea! How do you imagine the implementation of calculable months/years working?

I think we could make this work by implementing the ::calculate() class method on the Month and Year units (see Celsius & Fahrenheit units as an example).

@jordanbrauer jordanbrauer added this to the Production Ready v1.0.0 milestone Oct 12, 2017
jordanbrauer pushed a commit that referenced this issue Oct 12, 2017
Closes #10 

* Added time measurements

* Added requested changes

* Added new time units
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants