1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 09:37:12 +00:00
Lidarr/NzbDrone.Api/Resolvers/NullableDatetimeToString.cs
2013-05-19 17:30:02 -07:00

18 lines
426 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using AutoMapper;
namespace NzbDrone.Api.Resolvers
{
public class NullableDatetimeToString : ValueResolver<DateTime?, String>
{
protected override String ResolveCore(DateTime? source)
{
if(!source.HasValue)
return String.Empty;
return source.Value.ToString("yyyy-MM-dd");
}
}
}