Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-seconds-to-date

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-seconds-to-date

Filter to convert a number representing seconds to a Date object

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

angular-seconds-to-date

Filter to convert a number representing seconds to a Date object

npm version dependencies Build Status

From this awesome StackOverflow answer.

I found this filter to be of great use when attempting to format a number of seconds to a m[m]s[s] format using MomentJS, since simply passing the time to the moment constructor can lead to timezone issues.

Installation

Install angular-seconds-to-date by running:

$ npm install --save angular-seconds-to-date

Documentation

Add angular-seconds-to-date to your Angular module dependency list:

var MyApp = angular.module('MyApp', [
  require('angular-seconds-to-date')
]);

You can then make use of the secondsToDate filter:

{{ 180 | secondsToDate }}

Support

If you're having any problem, please raise an issue on GitHub and I'll be happy to help.

Tests

Run the test suite by doing:

$ npm test

Contribute

Before submitting a PR, please make sure that you include tests, and that jshint runs without any warning:

$ npm run lint

License

The project is licensed under the MIT license.

Keywords

FAQs

Package last updated on 30 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc