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

Add format specifiers for day of year #50

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

faizahfarzana
Copy link

@faizahfarzana faizahfarzana commented Jul 5, 2024

  • Add two new file name templates:

    1. {0:yyyy-jjj HH-mm-ss} for day of the year with leading zeroes
    2. {0:yyyy-j HH-mm-ss} for day of the year without leading zeroes
  • If the chosen format contains "jjj" or "j", format the file name accordingly. Otherwise use the standard format specifiers.

Related Issue: #49

@eltos
Copy link
Owner

eltos commented Jul 6, 2024

Hi @faizahfarzana
Thanks for working on this.

Could you please make sure that your implementation meets the following requirements:

  • Only consider j inside variable expression for variable 0
  • Correctly handle arbitrarily format specifiers with the letter j

Example templates for which your proposed implementation doesn't work:

  • "photos_jan_{1:000}"
  • "image {0:y-j-H-m-s}"
  • "Day {0:j} of {0:yyyy}"

@faizahfarzana
Copy link
Author

@eltos thanks for your feedback. I'll work on it.

@eltos
Copy link
Owner

eltos commented Jul 10, 2024

Before I forget, some people might even use the variable expression multiple times, e.g. Day {0:j} of {0:yyyy} for "Day 123 of 2024". So "j" might be in any of them.

@eltos eltos marked this pull request as draft July 22, 2024 14:38
@eltos eltos changed the title include format specifiers for day of year with and without leading ze… Add format specifiers for day of year Jul 22, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants