summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_view/components/date_separator.jsx
blob: 18dc0c7ff3d32070c55a03c3a04b0ec5213ec2fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import React from 'react';
import {FormattedDate} from 'react-intl';

export default class DateSeparator extends React.Component {
    render() {
        return (
            <div
                className='date-separator'
            >
                <hr className='separator__hr'/>
                <div className='separator__text'>
                    <FormattedDate
                        value={this.props.date}
                        weekday='short'
                        month='short'
                        day='2-digit'
                        year='numeric'
                    />
                </div>
            </div>
        );
    }
}

DateSeparator.propTypes = {
    date: React.PropTypes.instanceOf(Date)
};