functions.get_actual_time

 1import datetime
 2import streamlit as st
 3
 4
 5class GetActualTime:
 6    """
 7    Classe com métodos para exibição e consulta da hora atual.
 8    """
 9
10    def get_actual_time(self):
11        """
12        Conuslta o horárrio atual.
13
14        Returns
15        -------
16        hour : str
17            A hora atual.
18        """
19
20        now = datetime.datetime.now()
21        hour = now.strftime('%H:%M:%S')
22        return hour
23
24    def show_current_time(self):
25        """
26        Exibe a hora atual.
27        """
28
29        actual_hour = self.get_actual_time()
30        st.info(body="Hora atual: {}".format(actual_hour))
class GetActualTime:
 6class GetActualTime:
 7    """
 8    Classe com métodos para exibição e consulta da hora atual.
 9    """
10
11    def get_actual_time(self):
12        """
13        Conuslta o horárrio atual.
14
15        Returns
16        -------
17        hour : str
18            A hora atual.
19        """
20
21        now = datetime.datetime.now()
22        hour = now.strftime('%H:%M:%S')
23        return hour
24
25    def show_current_time(self):
26        """
27        Exibe a hora atual.
28        """
29
30        actual_hour = self.get_actual_time()
31        st.info(body="Hora atual: {}".format(actual_hour))

Classe com métodos para exibição e consulta da hora atual.

def get_actual_time(self):
11    def get_actual_time(self):
12        """
13        Conuslta o horárrio atual.
14
15        Returns
16        -------
17        hour : str
18            A hora atual.
19        """
20
21        now = datetime.datetime.now()
22        hour = now.strftime('%H:%M:%S')
23        return hour

Conuslta o horárrio atual.

Returns
  • hour (str): A hora atual.
def show_current_time(self):
25    def show_current_time(self):
26        """
27        Exibe a hora atual.
28        """
29
30        actual_hour = self.get_actual_time()
31        st.info(body="Hora atual: {}".format(actual_hour))

Exibe a hora atual.