mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Series/Index wired up to backbone, just need to add DT
This commit is contained in:
20
NzbDrone.Api/Resolvers/NullableDatetimeToString.cs
Normal file
20
NzbDrone.Api/Resolvers/NullableDatetimeToString.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AutoMapper;
|
||||
using NzbDrone.Api.QualityProfiles;
|
||||
using NzbDrone.Core.Repository.Quality;
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user