Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
This project is defunct. Use FormatterKit instead.
Objective-C
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
HHDistanceFormatter.xcodeproj
HHDistanceFormatter
HHDistanceFormatterTests
.gitignore
HHDistanceFormatter.podspec
LICENSE
README.markdown

README.markdown

HHDistanceFormatter

by Henrik Hodne

HHDistanceFormatter is a library to format distances in a user-friendly way.

Currently it can only format kilometers into a string showing the distance in kilometers or meters.

Planned features:

  • More units
  • Localization (use the unit the user prefers)

Getting started

Copy the HHDistanceFormatter.h and HHDistanceFormatter.m files into your own project (the HHDistanceFormatter group in the Xcode project).

Then, you use it like this:

NSNumber *distance = someObject.distanceToObject;
NSString *distanceStr = [HHDistanceFormatter formatKilometers:distance];

Downloading the code

You can get HHDistanceFormatter on GitHub.

Versioning

This project follows Semantic Versioning. Since version 1.0 hasn't been released yet, the public API of this library is to be considered unstable.

License

HHDistanceFormatter is released under the MIT license. See the LICENSE file for details.

Support, bugs and feature requests

I do not have the time to offer support, but if you submit an issue in the issue tracker, I'll answer if I have the time (or someone else can answer).

If you find a bug, please provide either a failing test or steps to reproduce. If you also provide a patch to fix it, that would be even better.

Something went wrong with that request. Please try again.