PasteIntoFile icon indicating copy to clipboard operation
PasteIntoFile copied to clipboard

Add format specifiers for day of year

Open faizahfarzana opened this issue 1 year ago • 3 comments

  • [x] 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
  • [x] If the chosen format contains "jjj" or "j", format the file name accordingly. Otherwise use the standard format specifiers.

Related Issue: https://github.com/eltos/PasteIntoFile/issues/49

faizahfarzana avatar Jul 05 '24 20:07 faizahfarzana

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}"

eltos avatar Jul 06 '24 20:07 eltos

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

faizahfarzana avatar Jul 10 '24 07:07 faizahfarzana

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 avatar Jul 10 '24 09:07 eltos