Show More
@@ -53,6 +53,7 b' def tokenize(program, start, end, term=N' | |||
|
53 | 53 | """Parse a template expression into a stream of tokens, which must end |
|
54 | 54 | with term if specified""" |
|
55 | 55 | pos = start |
|
56 | program = pycompat.bytestr(program) | |
|
56 | 57 | while pos < end: |
|
57 | 58 | c = program[pos] |
|
58 | 59 | if c.isspace(): # skip inter-token whitespace |
@@ -1913,6 +1913,7 b' def strdate(string, format, defaults=Non' | |||
|
1913 | 1913 | # add missing elements from defaults |
|
1914 | 1914 | usenow = False # default to using biased defaults |
|
1915 | 1915 | for part in ("S", "M", "HI", "d", "mb", "yY"): # decreasing specificity |
|
1916 | part = pycompat.bytestr(part) | |
|
1916 | 1917 | found = [True for p in part if ("%"+p) in format] |
|
1917 | 1918 | if not found: |
|
1918 | 1919 | date += "@" + defaults[part][usenow] |
General Comments 0
You need to be logged in to leave comments.
Login now