Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 04a2b5a4

Přidáno uživatelem Petr Hlaváč před asi 4 roky(ů)

Re #7939
- pridana dokumentace metod a trid
- korekce chyb v jmenech promenych
- pridani informaci pro vygenerovane skripty

Zobrazit rozdíly:

python-module/Utilities/DateFormating.py
1
def date_formater(string_date):
1
def date_formatter(string_date):
2
    """
3

  
4
    Args:
5
        string_date: string containing date in format 22.08.2018 12:27:00
6

  
7
    Returns:
8
        string of date in format 0804201814 ddmmYYYY
9
    """
2 10
    if string_date[11].isspace():
3 11
        pos = 0
4 12
        srr = ""
......
18 26
    return return_date
19 27

  
20 28

  
21
def date_time_formater(string_date):
29
def date_time_formatter(string_date):
30
    """
31
    Converts one type of date format "dd.mm.yyyy hh.mm.ss" to date format ddmmYYYYhh
32
    Args:
33
        string_date: string containing date in format 22.08.2018 12:27:00
34

  
35
    Returns:
36
        string of date in format 0804201814 ddmmYYYYhh
37
    """
22 38
    if string_date[11].isspace():
23 39
        pos = 0
24 40
        srr = ""
......
35 51

  
36 52
    return_date = string_date[:2] + string_date[3:5] + string_date[6:10] + string_date[11:13]
37 53

  
38
    return return_date
54
    return return_date

Také k dispozici: Unified diff