Skip to content

Instantly share code, notes, and snippets.

@goodwill
Created May 18, 2009 03:56
Show Gist options
  • Save goodwill/113307 to your computer and use it in GitHub Desktop.
Save goodwill/113307 to your computer and use it in GitHub Desktop.
public static class FormatUtil
{
public static CustomDateFormat CustomFormat(this DateTime dateTime)
{
return new CustomDateFormat(dateTime);
}
}
public class CustomDateFormat
{
private DateTime _value;
public CustomDateFormat(DateTime value)
{
_value = value;
}
public string ToLongDateString()
{
return _value.ToString("MMMM dd, yyyy");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment