What is a fuzzy date? A fuzzy date is a more familiar and general way to describe a data or time rather than an exact, precise time; it describes an event in a way that is more familiar to a reader than a precise timestamp. For example, rather than saying that an email was sent at 17:41, you could say it was sent "less than a minute ago" (assuming you sent it within the last minute) or even "a few moments ago". The precise time at which something occurred is considered unimportant—or at least unnecessary—information and it is instead replaced with a more general, informal, and conversational description of the date and time.
We're going to create two files:
/path/to/codeigniter/application/controllers/fuzzy_date.php
: This controller will call thefuzzy_date_helper.php
file and pass to it some dates (as a Unix timestamp) for the helper to convert./path/to/codeigniter/application/helpers/fuzzy_date_helper.php
: This helper will be called...