Skip to content

doowb/strings-parser-date

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strings-parser-date NPM version

Parser for strings to handle date parsing.

Install

Install with npm:

npm i strings-parser-date --save

Usage

Add as a strings parser:

var Strings = require('strings');
var date = require('strings-parser-date');

var strings = new Strings();
strings.parser('date', date());

var context = {
  date: '2014-MAY-15'
};
var template = ':YYYY';
var str = strings.template(template, 'date', context);

// expected: '2014'
console.log(str);

Author

Brian Woodward

License

Copyright (c) 2014 Brian Woodward, contributors.
Released under the MIT license


This file was generated by verb-cli on May 15, 2014.

About

Parser for strings to handle date parsing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  
  •  

Packages

No packages published