c# - Display equivalent of "MMM d, yyyy" in current culture info -
i've perused standard datetime formatters c# offers, , can't seem find 1 matches "short date" requirement: "may 4, 2013". know can custom format string accomplish goal:
mydatetimeoffset.tostring("mmm d, yyyy");
however, application may go other countries. there way current culture's equivalent particular format string?
mydatetimeoffset.tostring("mmm d, yyyy", cultureinfo.currentuiculture);
and have adapt equivalent "short date" format in foreign culture?
i don't think there's default format option baked in maches specific requirement (d
may come close). i've overview in bookmarks more 10 years now, , find still useful: http://samples.pdmlab.com/
anyway, app may not available infinite amount of languages, think best choice use kind of datetime extension method , format depending on actual language being used, if necessary.