class DateMessage extends React.Components { currentDateSTring(int_format){ const options = {year: 'numeric', month: '2-digit', day: '2-digit'}; return (new Intl.DateTimeFormat(int_format, options)).format(Date.now()); } render() { return
{this.currentDateString(this.props.format)}
} } ReactDOM.render(, document.getElementById('date'));