famex / helpers
Various small helper classes
Installs: 1 374
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
This package is auto-updated.
Last update: 2024-10-15 15:36:50 UTC
README
Various small helper classes
Installation
Just add "famex/helpers": "0.1.*",
to your composer.json
file.
Classes
DateHelper
currently provides one static function:
getDateDiff($time1, $time2, $precision = 2)
which takes two UNIX timestamps and returns a string in the format x days
.
LatLongDistHelper
currently provides one static function:
calculate($lat1, $lon1, $lat2, $lon2, $unit = "K")
which returns the distance between two lat/long pairs in km (K
) or miles (M
)