Ver código fonte

fix bug getting confused with momentjs formatting char LT and our T

Adam Shaw 11 anos atrás
pai
commit
46b401c090
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      src/date-formatting.js

+ 1 - 1
src/date-formatting.js

@@ -203,7 +203,7 @@ function getFormatStringChunks(formatStr) {
 // Break the formatting string into an array of chunks
 function chunkFormatString(formatStr) {
 	var chunks = [];
-	var chunker = /\[([^\]]*)\]|\(([^\)]*)\)|((\w)\4*o?T?)|([^\w\[\(]+)/g; // TODO: more descrimination
+	var chunker = /\[([^\]]*)\]|\(([^\)]*)\)|(LT|(\w)\4*o?)|([^\w\[\(]+)/g; // TODO: more descrimination
 	var match;
 
 	while ((match = chunker.exec(formatStr))) {