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

ember-date-fns

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-date-fns

Date helpers for Ember.js using date-fns

  • 0.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
40
increased by14.29%
Maintainers
2
Weekly downloads
 
Created
Source

Ember date-fns

npm version CircleCI

Lightweight date helpers for your ember-cli application thanks to date-fns. If all you need is to format a date, Ember date-fns will help you.

If you are looking for more features, see ember-moment instead.

Installation

In your ember-cli project, run either

ember install ember-date-fns

or

yarn add ember-date-fns

or

npm install --save ember-date-fns

Available helpers

All helpers map to the date-fns function of the same name.

Usage

date-format

Uses format to format a date object, string or timestamp.

{{date-format date "D. MMM YYYY"}}

date-from-now

Uses distanceInWordsToNow to return "time ago". By default no suffix is added.

{{date-from-now date addSuffix=true}}

Exposing additional date-fns

date-fns provides many functions for manipulating dates. In order to reduce bundle size only date-fns/distance_in_words_to_now and date-fns/format helpers are included by default. However you can import any functions anywhere in your application.

Example:

// app/components/some-component.js

import Ember from 'ember';
import endOfDay from 'date-fns/end_of_day';

// Your component code here...

Keywords

FAQs

Package last updated on 18 Feb 2019

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