<commit_before>// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP

import React, { Component, PropTypes } from 'react';

const CLASS_ROOT = 'timestamp';

export default class Timestamp extends Component {

  render () {
    var classes = [CLASS_ROOT];
    classes.push(CLASS_ROOT + '--' + this.props.align);
    if (this.props.className) {
      classes.push(this.props.className);
    }
    let locale;
    const dateOptions = { year: 'numeric', month: 'short', day: 'numeric' };
    const date = this.props.value.toLocaleDateString(locale, dateOptions);
    const timeOptions = { hour: '2-digit', minute: '2-digit' };
    const time = this.props.value.toLocaleTimeString(locale, timeOptions);
    return (
      <span className={classes.join(' ')}>
        <span className={CLASS_ROOT + '__date'}>{date}
        </span> <span className={CLASS_ROOT + '__time'}>{time}</span>
      </span>
    );
  }

}

Timestamp.propTypes = {
  align: PropTypes.oneOf['left', 'right'],
  value: PropTypes.object.isRequired
};

Timestamp.defaultProps = {
  align: 'left'
};<commit_msg>Fixed an issue with Timetamp propTypes.<commit_after>// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP

import React, { Component, PropTypes } from 'react';

const CLASS_ROOT = 'timestamp';

export default class Timestamp extends Component {

  render () {
    var classes = [CLASS_ROOT];
    classes.push(CLASS_ROOT + '--' + this.props.align);
    if (this.props.className) {
      classes.push(this.props.className);
    }
    let locale;
    const dateOptions = { year: 'numeric', month: 'short', day: 'numeric' };
    const date = this.props.value.toLocaleDateString(locale, dateOptions);
    const timeOptions = { hour: '2-digit', minute: '2-digit' };
    const time = this.props.value.toLocaleTimeString(locale, timeOptions);
    return (
      <span className={classes.join(' ')}>
        <span className={CLASS_ROOT + '__date'}>{date}
        </span> <span className={CLASS_ROOT + '__time'}>{time}</span>
      </span>
    );
  }

}

Timestamp.propTypes = {
  align: PropTypes.oneOf(['left', 'right']),
  value: PropTypes.object.isRequired
};

Timestamp.defaultProps = {
  align: 'left'
};
{'fraction_non_alphanumeric': 0.15199637023593465, 'fraction_numerical': 0.009074410163339383, 'mean_word_length': 3.642105263157895, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2465702', 'n_tokens_mistral': 700, 'n_tokens_neox': 677, 'n_words': 159}