1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00

Fix correct year extraction from date-string in

AccordionListItemWallet
WalletPieceContainer
This commit is contained in:
Tim Daubenschütz 2015-10-26 16:20:33 +01:00
parent 42733740db
commit 384ec0f445
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ let AccordionListItemWallet = React.createClass({
piece={this.props.content}
subsubheading={
<div className="pull-left">
<span>{this.props.content.date_created.split('-')[0]}</span>
<span>{new Date(this.props.content.date_created).getFullYear()}</span>
{this.getLicences()}
</div>}
buttons={

View File

@ -39,7 +39,7 @@ let WalletPieceContainer = React.createClass({
<hr style={{marginTop: 0}}/>
<h1 className="ascribe-detail-title">{this.props.piece.title}</h1>
<DetailProperty label="BY" value={this.props.piece.artist_name} />
<DetailProperty label="DATE" value={ this.props.piece.date_created.slice(0, 4) } />
<DetailProperty label="DATE" value={new Date(this.props.piece.date_created).getFullYear()} />
<hr/>
</div>
}