Created
May 18, 2009 03:56
-
-
Save goodwill/113307 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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