[Snyk] Upgrade tinydate from 1.2.0 to 1.3.0 by snyk-bot · Pull Request #1341 · docsifyjs/docsify

You may optionally add new patterns or override existing patterns through tinydate's second parameter. You will still receive a render function – now with your customized functionality!

const today = new Date('2019-07-04, 5:30:00 PM');

// Example custom dictionary:
// - Adds {MMMM}
// - Overrides {DD}
const stamp = tinydate('Today is: {MMMM} {DD}, {YYYY}', {
MMMM: d => d.toLocaleString('default', { month: 'long' }),
DD: d => d.getDate()
});

stamp(today);
//=> 'Today is: July 4, 2019'