Author Topic: Variable: Quarter (of year)  (Read 271 times)

Offline TGeist

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • GG-IMAGES :: Charlotte Wedding Photographer
Variable: Quarter (of year)
« on: January 08, 2019, 11:32:42 PM »
Among the plethora of useful date variables, can we also have one for the quarter of the year?

In an array of dated folders or files a subdivision into annual quarters can help minimizing the clutter.

Thank you!
Thomas

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 18755
    • View Profile
    • Camera Bits, Inc.
Re: Variable: Quarter (of year)
« Reply #1 on: January 09, 2019, 07:59:21 AM »
Thomas,

Among the plethora of useful date variables, can we also have one for the quarter of the year?

In an array of dated folders or files a subdivision into annual quarters can help minimizing the clutter.

What would be the output of such a variable?  Q1, Q2, Q3, Q4?

-Kirk

Offline TGeist

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • GG-IMAGES :: Charlotte Wedding Photographer
Re: Variable: Quarter (of year)
« Reply #2 on: January 15, 2019, 01:20:38 AM »
Just the number might be even more flexible. One can always put the Q in front of it: something like Q{quarter}.

This would also be better for other languages that might not have a word starting with a Q for quarter.
I am always pleasantly amazed by PM's power of variables!

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 1952
  • Professional Photographer and Workshop Leader
    • View Profile
    • Hayo Baan - Photography
Re: Variable: Quarter (of year)
« Reply #3 on: January 15, 2019, 03:16:18 AM »
How about creating a code replacement for the month variable that turns it into the quarter? That would allow you to make use of the “quarter” right now :)
Hayo Baan - Photography
Web: www.hayobaan.nl
Blog: blog.hayobaan.nl
500px: 500px.com/HayoBaan
Facebook: facebook.com/HayoBaan

Offline TGeist

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • GG-IMAGES :: Charlotte Wedding Photographer
Re: Variable: Quarter (of year)
« Reply #4 on: January 16, 2019, 10:23:16 PM »
Interesting!

Now I need to find out how code replacements work ...  ;)

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 18755
    • View Profile
    • Camera Bits, Inc.

Offline TGeist

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • GG-IMAGES :: Charlotte Wedding Photographer
Re: Variable: Quarter (of year)
« Reply #6 on: Yesterday at 10:03:40 AM »
Concerning the code replacement that would mean that I'd lose the moth variable however.

A string like

{year4}-{quarter}/{year4}-{month0}-{day0}

could not be generated via a code replacement where months are replaced by the respective quarter's number.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 18755
    • View Profile
    • Camera Bits, Inc.
Re: Variable: Quarter (of year)
« Reply #7 on: Yesterday at 10:06:56 AM »
Concerning the code replacement that would mean that I'd lose the moth variable however.

A string like

{year4}-{quarter}/{year4}-{month0}-{day0}

could not be generated via a code replacement where months are replaced by the respective quarter's number.

No.  You're not using Code Replacement in that example.  You've invented a new variable that doesn't exist (it won't output anything).

It needs to be like this:

{year4}-={year4}=/{year4}-{month0}-{day0}

-Kirk