0.0.4 • Published 8 years ago

chrono-refiner-wholemonth v0.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Build Status

chrono-refiner-wholemonth

A chrono refiner for returning whole month ranges

Installation

npm install chrono-refiner-wholemonth

Usage

Add the refiner to any chrono parser you need it in.

import chrono from 'chrono-node'
import wholeMonth from 'chrono-refiner-wholemonth'

const parser = new chrono.Chrono
parser.refiners.push(wholeMonth)

parser.parse('Jan - Feb') // returns start: Jan 1, 2016 end: Feb 29, 2016