1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

pad month with 0

This commit is contained in:
Kyle Spearrin 2017-04-10 10:50:46 -04:00
parent 5705f4f736
commit 315c59b2ae

View File

@ -59,7 +59,10 @@ namespace Bit.Core.Models.Api
{
case SourceType.Card:
Description = $"{source.Card.Brand}, *{source.Card.Last4}, " +
$"{source.Card.ExpirationMonth}/{source.Card.ExpirationYear}";
string.Format("{0}/{1}",
string.Concat(source.Card.ExpirationMonth.Length == 1 ?
"0" : string.Empty, source.Card.ExpirationMonth),
source.Card.ExpirationYear);
CardBrand = source.Card.Brand;
break;
case SourceType.BankAccount: