md-date
get date from markdown article
Install
npm install --save md-date
Usage
; const input = `# title 21 asd qwe 22 *Dec* 2016 23 December 2016 24 Décembre 2016`; text; // 21 Dec 2016html; // 22 <em>Dec</em> 2016unix; // 1482364800text; // 23 December 2016text; // 24 Décembre 2016moment; // moment instancenode; // MDAST node, see remark API; // undefined
API
getDate(format, locale, input)
format
Required
Type: String
Momentjs format for date, e.g. DD MMMM YYYY
.
locale
Required
Type: String
One of 83 available in momentjs locales, e.g. en
or fr
.
input
Required
Type: String
Markdown string.
Related
- md-article - extract data from your markdown article
- md-content - get content from markdown article
- md-tags - get tags from markdown article
- md-title - get title from markdown article
License
MIT © Aleksandr Filatov