From 9d46d6495e6a3e7dc1eede5c48364ec12b511d00 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Thu, 10 Aug 2023 22:53:15 +0100 Subject: [PATCH] fix: 0-pad Published properties --- OliverBooth/Controllers/BlogApiController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OliverBooth/Controllers/BlogApiController.cs b/OliverBooth/Controllers/BlogApiController.cs index 32aaf82..f73d2bd 100644 --- a/OliverBooth/Controllers/BlogApiController.cs +++ b/OliverBooth/Controllers/BlogApiController.cs @@ -1,4 +1,4 @@ -using Humanizer; +using Humanizer; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Primitives; using OliverBooth.Data.Blog; @@ -50,9 +50,9 @@ public sealed class BlogApiController : ControllerBase url = Url.Page("/Blog/Article", new { - year = post.Published.Year, - month = post.Published.Month, - day = post.Published.Day, + year = post.Published.ToString("yyyy"), + month = post.Published.ToString("MM"), + day = post.Published.ToString("dd"), slug = post.Slug }) }));