repl.it
@anonymous/

AgreeableLankyPewee

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from datetime import*
def f(k):g=[*map(int,k.split('-'))];n=g[2];return f"{date(*g):%-d{'tsnrhtdd'[n%5*(n^15>4>n%10)::4]} %B %Y}"


for x in [
  "1980-05-12",
  "2005-12-3",
  "150-4-21",
  "2011-10-10",
  "2011-2-29",
  "1999-10-35"]:
     try:
       print(x, '=>', f(x))
     except:
       print("Error")
       
""""1980-05-1",
  "1980-05-2",
  "1980-05-3",
  "1980-05-4",
  "1980-05-5",
  "1980-05-6",
  "1980-05-7",
  "1980-05-8",
  "1980-05-9",
  "1980-05-10",
  "1980-05-11",
  "1980-05-12",
  "1980-05-13",
  "1980-05-14",
  "1980-05-15",
  "1980-05-16",
  "1980-05-17",
  "1980-05-18",
  "1980-05-19",
  "1980-05-20",
  "1980-05-21",
  "1980-05-22",
  "1980-05-23",
  "1980-05-24",
  "1980-05-25",
  "1980-05-26",
  "1980-05-27",
  "1980-05-28",
  "1980-05-29",
  "1980-05-30","""
Fetching token
?