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

ractive-datetime

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ractive-datetime

A date and time format mustache helper for [Ractive](http://www.ractivejs.org/), using [Moment.js](http://momentjs.com/)

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Ractive Date/Time helper

A date and time format mustache helper for Ractive, using Moment.js


Usage

Note: this helper is a self-registering CommonJS module, and in the browser requires a module system such as Webpack or Browserify.

npm install ractive-datetime

ES5:

var Ractive = require('ractive');
require('ractive-date-time');

ES6/2015+:

import Ractive from 'ractive';
import 'ractive-date-time';

In Ractive template:

<h2>{{datetime(some_date, 'MMMM Do, YYYY')}}</h2>
<h3>{{datetime(some_date, 'H:mmA')}}</h3>
Outputs:

May 28th, 2016

9:15AM

Full format options are here.


Relative dates:

<h2>{{fromNow(some_past_date)}}</h2>
Outputs:

7 months ago

Keywords

FAQs

Package last updated on 29 May 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