travis-ci
61 of 233 branches covered (26.18%)
60 of 60 new or added lines in 3 files covered. (100.0%)
2678 of 3561 relevant lines covered (75.2%)
1.87 hits per line
|
from django import template |
1✔ |
|
register = template.Library() |
1✔ |
3 |
|
|
4 |
|
|
|
@register.filter
|
1✔ |
6 |
def month(input): |
|
7 |
"""
|
|
8 |
Takes an integer returns a month |
|
9 |
""" |
|
|
if input == 1: |
× |
|
return "Jan" |
× |
12 |
|
|
|
if input == 2: |
× |
|
return "Feb" |
× |
15 |
|
|
|
if input == 3: |
× |
|
return "Mar" |
× |
18 |
|
|
|
if input == 4: |
× |
|
return "Apr" |
× |
21 |
|
|
|
if input == 5: |
× |
|
return "May" |
× |
24 |
|
|
|
if input == 6: |
× |
|
return "Jun" |
× |
27 |
|
|
|
if input == 7: |
× |
|
return "Jul" |
× |
30 |
|
|
|
if input == 8: |
× |
|
return "Aug" |
× |
33 |
|
|
|
if input == 9: |
× |
|
return "Sep" |
× |
36 |
|
|
|
if input == 10: |
× |
|
return "Oct" |
× |
39 |
|
|
|
if input == 11: |
× |
|
return "Nov" |
× |
42 |
|
|
|
if input == 12: |
× |
|
return "Dec" |
× |
45 |
|
|
|
return "" |
× |
47 |
|