angular-humanSeconds

AngularJS filter for converting a number of seconds to a human readable time

Angular Core Dependency: >=1.2

Module License: LGPLv3

Added by: Sam Deering

GitHub

Repository

tsaikd/angular-humanseconds

Stats

Stars: 7

Watchers: 7

Forks: 2

Author

Tsai KD
Tsai KD

Module Description

angular-humanSeconds GitHub version

Dependency Status devDependency Status Build Status Built with Grunt

AngularJS filter for converting a number of seconds to a human readable time

support i18N with angular-translate package

fork from https://github.com/wildlyinaccurate/angular-readable-time

Usage

Include angular-translate.min.js and angular-humanSeconds.min.js in your application.

<script src="angular-translate.min.js"></script>
<script src="angular-humanSeconds.min.js"></script>

Add the pascalprecht.translate and humanSeconds module to your application's dependencies.

angular.module("myApp", ["pascalprecht.translate", "humanSeconds"]);

Use the filter by passing it a number of seconds.

<p>{{ 60 | humanSeconds }}</p>
<p>{{ 128000 | humanSeconds }}</p>

The above example will look something like this:

1 minute

2 weeks

If use zh-tw locale

1 分

2 週

If you use this module you can give it a thumbs up at http://ngmodules.org/modules/angular-humanSeconds.

Module stats last updated: 2015-06-07 05:25:39

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!