Projekt

Obecné

Profil

Stáhnout (840 Bajtů) Statistiky
| Větev: | Revize:
1 c8f3051b petrh
def date_formater(string_date):
2
    if string_date[11].isspace():
3
        pos = 0
4
        srr = ""
5
        for i in string_date:
6
7
            if pos == 10:
8
                srr = srr + '0'
9
            else:
10
                srr = srr + i
11
12
            pos = pos + 1
13
14
        string_date = srr
15
16
    return_date = string_date[:2] + string_date[3:5] + string_date[6:10]
17
18
    return return_date
19
20
21
def date_time_formater(string_date):
22
    if string_date[11].isspace():
23
        pos = 0
24
        srr = ""
25
        for i in string_date:
26
27
            if pos == 10:
28
                srr = srr + '0'
29
            else:
30
                srr = srr + i
31
32
            pos = pos + 1
33
34
        string_date = srr
35
36
    return_date = string_date[:2] + string_date[3:5] + string_date[6:10] + string_date[11:13]
37
38
    return return_date