Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2151

Provide functions $year(), $month(), $day()

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.7.0b1
    • 2.6.0b2
    • Scripting
    • None

      Provide function to easily access the year, month and day part of a date:

      $year(%date%)

      $month(%date%)

      $day(%date%)

      Especially extracting the year is quite common in scripts, currently most examples use $left(%date%, 4).

       

      We could even complement this with a full $dateformat(%date%, format) function. The format would work similar to https://picard-docs.musicbrainz.org/en/functions/func_datetime.html

       

      $year(), $month() and $day() would then be just convenience functions on top of $dateformat()

       

       

       

            rdswift Bob Swift
            outsidecontext Philipp Wolfer
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Version Package
                2.7.0b1