Skip to content

Allow inserting custom date format in license header #2720

Description

@caymaynard

Similar to #1147, I have a custom license header format which included the date when the file was created.
This date is somewhat custom as well, it uses the format long_month day, year, e.g. November 14, 2025.

The IntelliJ plugin supports the format method for any date https://www.jetbrains.com/help/idea/copyright-profiles.html#profile_page

It would be great if Spotless also had a similar method to customize the format of the current time instead of only inserting the year.

The ideal format would be something like

Copyright (c) $NOW.format("MMMM dd, YYYY")

which would display as

Copyright (c) November 14, 2025

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions