Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 830 Bytes

clock_py_dyntylluan.md

File metadata and controls

23 lines (20 loc) · 830 Bytes

clock.py by DynTylluan

About

clock_py_dyntylluan.md, as written by DynTylluan, is a book that takes code directly from TrainClock.

The book itself was found in the overworld of mc.neozones.club at -55 / 81 / -154 on a lectern.

Contents

from datetime import datetime #imports datetieme package
class Clock: #constructs the clock class
  now = 0
  def time(): #constructs the time method
    now = datetime.now()
    now = str(now)
    now = now [11:-10] #trunctuates the time out of datetime
    return now
  def date(): #constructs the date method
    today = datetime.now()
    today = str(today)
    today = today [0:10] #trunctuates the date out of datetime
    return today