#User age in hours# This is a simple demonstration application that will allow a user to enter their name and date of birth and then display the number of years, days and hours the person has been alive.
##Use cases##
- As a user, I should be able to enter my full name.
- As a user, I should be able enter my date of birth using a date-picker. The date should be in the format DD/MM/YYYY
- As a user, after entering my name and date of birth, I should be able to see how many years, days and hours I have been alive.
- As a user, I should be able to view the names and ages (years/days/hours) of all other users that have used the application.
###Assumptions###
- A user should be able to type their date of birth as well as use a date picker.
- When displaying the length of time that the user has been alive, leap years should be incorporated.
- When viewing other users' information, no pagination is required.
- Previous user information will persist as long as the storage mechanism is not truncated.
- A valid PHP timezone is set on the host server.
##Usage## ###Installation###
- Set up a new MySQL database.
- Import the schema in
/sql/schema.sql
- Create the file
/config/autoload/local.php
. Use the contents of/config/autoload/local.php.dist
as a template and fill in your database credentials. - Install the project dependencies using composer.
- Ensure that your the
APPLICATION_ENV
environment variable is set todevelopment
###Tests### The primary business logic is supported by unit tests to run these from within the test directory, run:
../vendor/bin/phpunit