File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ def __init__(self):
1717
1818 def get_current_time_as_html_fragment(self):
1919 current_time = self.time_provider.now()
20- current_time_as_html_fragment = "<span class=\" tinyBoldText\" >" + current_time.hour + ":" + current_time.minute + " </span>"
20+ current_time_as_html_fragment = "<span class=\" tinyBoldText\" >{} </span>".format(current_time)
2121 return current_time_as_html_fragment
2222"""
2323
@@ -31,7 +31,7 @@ def set_time_provider(self, time_provider):
3131
3232 def get_current_time_as_html_fragment (self ):
3333 current_time = self .time_provider .now ()
34- current_time_as_html_fragment = "<span class=\" tinyBoldText\" >" + current_time + " </span>"
34+ current_time_as_html_fragment = "<span class=\" tinyBoldText\" >{} </span>" . format ( current_time )
3535 return current_time_as_html_fragment
3636
3737class ProductionCodeTimeProvider (object ):
@@ -42,7 +42,7 @@ class ProductionCodeTimeProvider(object):
4242
4343 def now (self ):
4444 current_time = datetime .datetime .now ()
45- current_time_formatted = str (current_time .hour ) + ":" + str ( current_time .minute )
45+ current_time_formatted = "{}:{}" . format (current_time .hour , current_time .minute )
4646 return current_time_formatted
4747
4848class MidnightTimeProvider (object ):
You can’t perform that action at this time.
0 commit comments