1465 | | 'now01': ('{% now "j n Y"%}', {}, str(datetime.now().day) + ' ' + str(datetime.now().month) + ' ' + str(datetime.now().year)), |
1466 | | |
1467 | | # Check parsing of escaped and special characters |
1468 | | 'now02': ('{% now "j "n" Y"%}', {}, template.TemplateSyntaxError), |
1469 | | # 'now03': ('{% now "j \"n\" Y"%}', {}, str(datetime.now().day) + '"' + str(datetime.now().month) + '"' + str(datetime.now().year)), |
1470 | | # 'now04': ('{% now "j \nn\n Y"%}', {}, str(datetime.now().day) + '\n' + str(datetime.now().month) + '\n' + str(datetime.now().year)) |
| 1465 | 'now01': ('{% now "j n Y" %}', {}, "%d %d %d" % ( |
| 1466 | datetime.now().day, datetime.now().month, datetime.now().year)), |
1472 | | 'now05': ('{% now "DATE_FORMAT" %}', {}, date_format(datetime.now())), |
| 1468 | 'now02': ('{% now "DATE_FORMAT" %}', {}, date_format(datetime.now())), |
| 1469 | # Also accept simple quotes - #15092 |
| 1470 | 'now03': ("{% now 'j n Y' %}", {}, "%d %d %d" % ( |
| 1471 | datetime.now().day, datetime.now().month, datetime.now().year)), |
| 1472 | 'now04': ("{% now 'DATE_FORMAT' %}", {}, date_format(datetime.now())), |
| 1473 | 'now05': ('''{% now 'j "n" Y'%}''', {}, '''%d "%d" %d''' % ( |
| 1474 | datetime.now().day, datetime.now().month, datetime.now().year)), |
| 1475 | 'now06': ('''{% now "j 'n' Y"%}''', {}, '''%d '%d' %d''' % ( |
| 1476 | datetime.now().day, datetime.now().month, datetime.now().year)), |