text: import datetime
  
  import parsedatetime as pdt
  from discord.ext import commands
  
  
  def time_took(dt: datetime.datetime, now_dt: datetime.datetime = None, only_hours = False):
      now = now_dt or datetime.datetime.utcnow()
      delta = now - dt
      hours, remainder = divmod(int(delta.total_seconds()), 3600)
      minutes, seconds = divmod(remainder, 60)
      days, hours = divmod(hours, 24)
      if only_hours:
          return hours
      if days:
          fmt = '{d} days, {h} hours, {m} minutes, and {s} seconds'
      else:
          fmt = '{h} hours, {m} minutes, and {s} seconds'
  
      return fmt.format(d = days, h = hours, m = minutes, s = seconds)
  
  class HumanTime:
      calendar = pdt.Calendar(version=pdt.VERSION_CONTEXT_STYLE)
  
      def __init__(self, argument, *, now=None):
          now = now or datetime.datetime.utcnow()
          dt, status = self.calendar.parseDT(argument, sourceTime=now)
          if not status.hasDateOrTime:
              raise commands.BadArgument(
                  'invalid time provided, try e.g. "tomorrow" or "3 days"')
  
          if not status.hasTime:
              # replace it with the current time
              dt = dt.replace(hour=now.hour, minute=now.minute,
                              second=now.second, microsecond=now.microsecond)
  
          self.dt = dt
          self._past = dt < now
  
      @classmethod
      async def convert(cls, ctx, argument):
          return cls(argument, now=ctx.message.created_at)
  
  
  class Time(HumanTime):
      def __init__(self, argument, *, now=None):
          try:
              o = ShortTime(argument, now=now)
          except Exception as e:
              super().__init__(argument)
          else:
              self.dt = o.dt
              self._past = False
  
  
  class FutureTime(Time):
      def __init__(self, argument, *, now=None):
          super().__init__(argument, now=now)
  
          if self._past:
              raise commands.BadArgument('this time is in the past')