puppetlabs/puppet · error · ArgumentError

copyright with a year %{value} is very strange; did you acci

Error message

copyright with a year %{value} is very strange; did you accidentally add or subtract two years?

What it means

Error "copyright with a year %{value} is very strange; did you accidentally add or subtract two years?" thrown in puppetlabs/puppet.

Source

Thrown at lib/puppet/interface/documentation.rb:318

        else
          year
        end
      end.join(", ")
    end

    # @api private
    def munge_copyright_year(input)
      case input
      when Range then input
      when Integer then
        if input < 1970 then
          fault = "before 1970"
        elsif input > (future = Time.now.year + 2) then
          fault = "after #{future}"
        end
        if fault then
          # TRANSLATORS 'copyright' is an attribute name and should not be translated
          raise ArgumentError, _("copyright with a year %{value} is very strange; did you accidentally add or subtract two years?") %
                               { value: fault }
        end

        input

      when String then
        input.strip.split(/,/).map do |part|
          part = part.strip
          if part =~ /^\d+$/
            part.to_i
          else
            found = part.split(/-/)
            if found
              unless found.length == 2 and found.all? { |x| x.strip =~ /^\d+$/ }
                # TRANSLATORS 'copyright' is an attribute name and should not be translated
                raise ArgumentError, _("%{value} is not a good copyright year or range") % { value: part.inspect }
              end

View on GitHub (pinned to e227c27540)

When it happens

Trigger: Thrown at lib/puppet/interface/documentation.rb:318 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21). Data as JSON: /api/errors/6ad3810729981c2c. Report an issue: GitHub.