ago

Converts given date into a nice readable format. Supports multiple languages. Example will be "1 hour ago", "2 days ago", "1 second ago", "Online" and so on.

MIT License

Downloads
2.1K
Stars
6
Committers
2
ago - v2.1.0

Published by SerhiiCho almost 3 years ago

v2.1.0 (2021-12-04)

  • Other bug fixes with language rules.
  • Code refactoring
  • Bug fix with English language 0 seconds ago.
- 0 second ago
+ 0 seconds ago
ago - v2.0.8

Published by SerhiiCho almost 3 years ago

  • Added more types for phpstan static analyzer.
  • Added CHANGELOG.md file to the root of the project.
ago - v2.0.7

Published by SerhiiCho over 3 years ago

  • Fixed typo in composer.json
ago - v2.0.6

Published by SerhiiCho over 3 years ago

  • Added php8 to composer json
ago - v2.0.5

Published by SerhiiCho almost 4 years ago

  • Added new option UPPER that convert number to uppercase.
  • Refactored code.
ago - v2.0.4

Published by SerhiiCho almost 4 years ago

  • Small refactoring
  • Added custom exception
ago - v2.0.3

Published by SerhiiCho almost 4 years ago

  • Installed static analizators
ago - v2.0.2

Published by SerhiiCho almost 4 years ago

  • Removed usage of mb_strtolower function from library
ago - v2.0.1

Published by SerhiiCho almost 4 years ago

  • Added backslash before each PHP's native function
ago - v2.0

Published by SerhiiCho almost 4 years ago

  • Changed string options to constants
  • Renamed Time class to TimeAgo
  • Renamed ago() method to trans()
  • Added support for Ukrainian language
  • Added easy way to add another language to the library
  • Added documentation for contributing
  • Added more tests
  • Refactored code
  • Added support for PHP8
ago - v1.3.2

Published by SerhiiCho almost 4 years ago

  • Added MIT license
ago - v1.3.1

Published by SerhiiCho almost 4 years ago

  • Changed site address from serhii.tk to serhii.io
ago - v1.3

Published by SerhiiCho almost 5 years ago

Changed namespace for tests

ago - v1.2.1

Published by SerhiiCho almost 5 years ago

Readme file changes

ago - v1.2

Published by SerhiiCho almost 5 years ago

Fixed displaying correct time on Russian for some numbers

  • Added more tests for covering that part of the code
ago - v1.1.0

Published by SerhiiCho almost 5 years ago

  • Added ability to pass multiple options via array.
  • Added more tests.
  • Added new option "upcoming" that allows to convert date from future.
ago - v1.0.3

Published by SerhiiCho almost 5 years ago

  • New flag for Time::ago() method with the name Time::NO_SUFFIX. It allows to remove the end of the result date. For example without flag you will get output "5 seconds ago" but with new flag the output will be "5 seconds"
  • Added more info to readme.md file
ago - v1.0.2

Published by SerhiiCho about 5 years ago

Improvements and small bug fix

  • Added more tests to set() method
  • Fixed wrong time displaying for English
ago - v1.0.1

Published by SerhiiCho about 5 years ago

Renamed Ago class into Time

ago - v1.0.0

Published by SerhiiCho about 5 years ago

First version of the package