()
| 48 | |
| 49 | |
| 50 | def test_month_tokens(): |
| 51 | f = Formatter() |
| 52 | d = pendulum.datetime(2016, 3, 24) |
| 53 | assert f.format(d, "MM") == "03" |
| 54 | assert f.format(d, "M") == "3" |
| 55 | |
| 56 | assert f.format(d, "MMM") == "Mar" |
| 57 | assert f.format(d, "MMMM") == "March" |
| 58 | assert f.format(d, "Mo") == "3rd" |
| 59 | |
| 60 | assert f.format(d, "MMM", locale="fr") == "mars" |
| 61 | assert f.format(d, "MMMM", locale="fr") == "mars" |
| 62 | assert f.format(d, "Mo", locale="fr") == "3e" |
| 63 | |
| 64 | |
| 65 | def test_day_tokens(): |