Skip to content

Instantly share code, notes, and snippets.

@selcukusta
Created December 20, 2017 13:16
Show Gist options
  • Select an option

  • Save selcukusta/d9ed757832f73e464485c1dc9f8160d2 to your computer and use it in GitHub Desktop.

Select an option

Save selcukusta/d9ed757832f73e464485c1dc9f8160d2 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
namespace framework.extension
{
public static class DateTimeExtensions
{
public static string ToPrettyDate(this DateTime date, CultureInfo culture)
{
if (culture == null)
{
throw new ArgumentNullException(nameof(culture));
}
return date.ToString("dd MMMMM yyyy", culture);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment