ニジカ AI 共通サービス
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.0 KiB

  1. from __future__ import annotations
  2. import asyncio
  3. from datetime import date, datetime, time
  4. async def main (
  5. ) -> None:
  6. ...
  7. async def queries_to_answers (
  8. ) -> None:
  9. ...
  10. async def kiriban (
  11. ) -> None:
  12. ...
  13. async def report_nico (
  14. ) -> None:
  15. ...
  16. async def schedule_task (
  17. dt_tuple: tuple[int | None, int | None, int | None, int | None, int | None, int | None],
  18. ) -> None:
  19. ...
  20. def dt_to_tuple (
  21. dt: datetime | date | time,
  22. ) -> tuple[int | None, int | None, int | None, int | None, int | None, int | None]:
  23. year: int | None = None
  24. month: int | None = None
  25. day: int | None = None
  26. hour: int | None = None
  27. minute: int | None = None
  28. second: int | None = None
  29. if not isinstance (dt, time):
  30. year = dt.year
  31. month = dt.month
  32. day = dt.day
  33. if not isinstance (dt, date):
  34. hour = dt.hour
  35. minute = dt.minute
  36. second = dt.second
  37. return (year, month, day, hour, minute, second)
  38. if __name__ == '__main__':
  39. asyncio.run (main ())