Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the Month Format #1

Open
RmBau opened this issue May 28, 2020 · 1 comment
Open

Changing the Month Format #1

RmBau opened this issue May 28, 2020 · 1 comment

Comments

@RmBau
Copy link

RmBau commented May 28, 2020

How do I change the month format to text for the directory?

@zspatter
Copy link
Owner

Sorry for the delay, I haven't been monitoring this repo very closely.

Anyway, you can leverage strftime to achieve this fairly easily. You'll only need to alter 1 line in the EventHandler.py script to alter the directory names for the month.

Essentially, you just need to update the month portion of dated_path from f'{date.today().month:02d}' to f'{date.today().strftime("%B")} The full line for the updated dated_path is shown below (curently line 17).

dated_path = path / f'{date.today().year}' / f'{date.today().strftime("%B")}'

Note: %B will specify the full month name. If you'd prefer the shortened name, use the %b specifier instead. I hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants