import formatDate from './formatDate' ; import parseDate from './parseDate' ; import { CustomFormatters , FormatFunction , FormatOptions } from './types' ; export default function createDateFormatter ( customFormatters ) { return function intlFormatDate ( date , format , options ? ) : string { const tokens = parseDate ( date , options ) ; const output = formatDate ( customFormatters , format , tokens , date ) ; return output ; } ; }