react-year

0.0.1 • Public • Published

React <Year>

A react-component to format and display a year.

Getting Started

  • Install with NPM - npm install --save react-year

Usage

var React = require('react');
var Year  = require('react-year');
 
var Component = React.createClass({
  render: function () {
    return (
      <Year format="numeric" date="13/06/1982"></Year>
    );
  }
});

Options

Property Type Argument Values Default Description
date string <optional> RFC2822/ISO8601 today RFC2822/ISO8601 format.
format string <optional> numeric, 2-digit numeric representation format.

Developing

react-year is built using ES6. Run the following task to compile the src/ into dist/.

npm run build

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.

License

Copyright (c) 2015 Jason Bellamy
Licensed under the MIT license.

/react-year/

    Package Sidebar

    Install

    npm i react-year

    Weekly Downloads

    3

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • jasonbellamy