How to insert creation date in JavaDoc

24,803

Most IDE's have a mechanism to define templates to use when creating new classes. The current date can usually be inserted as part of the template.

For example, here is the documentation for eclipse and this page shows the variables which can be used in templates.

Share:
24,803
ᴜsᴇʀ
Author by

ᴜsᴇʀ

Updated on April 01, 2020

Comments

  • ᴜsᴇʀ
    ᴜsᴇʀ about 4 years

    What is the best way to insert the date of the creation of a class in JavaDoc? Some examples:

    Below the author tag with the string "created on"

    /**
     * Class description
     *
     * @author Author Name
     * created on 2015/04/01
     */
    public class ClassName() {
    ...
    }
    

    Below the author tag with the string "Date:"

    /**
     * Class description
     *
     * @author Author Name
     * Date:   2015/04/01
     */
    public class ClassName() {
    ...
    }
    

    With a non-existent @date tag

    /**
     * Class description
     *
     * @author Author Name
     * @date   2015/04/01
     */
    public class ClassName() {
    ...
    }
    

    Other...

    And eventually, what is the best date format?

    April 1, 2015
    2015/04/01
    ...