blob: 1e02dc9a1a1639dce3642acf063c602e2f122257 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import pathlib
import datetime
from serenitas.utils.env import DAILY_DIR
def get_dir(workdate: datetime.date) -> pathlib.Path:
p = DAILY_DIR / str(workdate) / "Reports"
if not p.exists():
p = (
DAILY_DIR
/ str(workdate.year)
/ f"{workdate:%Y_%m}"
/ str(workdate)
/ "Reports"
)
return p
|