You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

react.js 601B

123456789101112131415161718
  1. class DateMessage extends React.Components
  2. {
  3. currentDateSTring(int_format){
  4. const options = {year: 'numeric', month: '2-digit', day: '2-digit'};
  5. return (new Intl.DateTimeFormat(int_format, options)).format(Date.now());
  6. }
  7. render() {
  8. return <div className="container">
  9. <div className="col-xs-12">
  10. <span className="pull-right">
  11. {this.currentDateString(this.props.format)}
  12. </span>
  13. </div>
  14. </div>
  15. }
  16. }
  17. ReactDOM.render(<DateMessage format="de-DE"/>, document.getElementById('date'));