How can I convert date time format string used by C# to the format used by moment.js?
问题 C# uses string like that 'dd MMMM yyyy HH:mm' to define format the date and time should be displayed in. Equivalent of that in momentjs is 'DD MMMM YYYY HH:mm' . Is there some function that can covert one format definition into the other regardless of what (legal) combination of format specifiers source format contains? Basically what I want is: function toMomentJsFormatDefinition(cSharpFormatDefinition) { // should convert all format strings described here https://msdn.microsoft.com/en-us