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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.6.0b2
    • Fix Version/s: 2.7.0b1
    • Component/s: Scripting
    • Labels:
      None

      Description

      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()

       

       

       

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:

                Packages

                Version Package
                2.7.0b1