lcfd / trak

Keep a record of the time you dedicate to your projects.
https://usetrak.com
GNU Affero General Public License v3.0
11 stars 2 forks source link

[report] Use start date for filtering #76

Closed lcfd closed 1 month ago

lcfd commented 6 months ago

Using start handles the “past midnight” sessions. It becomes more intuitive.

The only exception is when only end is passed.

  elif start is None and end is not None:
      records = [
          record
          for record in records
          if record.get("end", "") != ""
          and datetime.fromisoformat(record["end"]).date() == end.date()
      ]