6

I've tried googling this but didn't find a complete answer to this question:

Can I set the date format for the @since annotation in javadoc? Or how do I see what format is set?

Don
  • 1,428
  • 3
  • 15
  • 31

6 Answers6

9

The @since tag should be used to define which version you added the method, class, etc. This is your hint to other developers that they should only expect the method when they run against a particular version of the package. I would consider these uber-important parts of the documentation if you're shipping your code as a library intended for someone else to use.

/**
 * @author    Firstname Lastname <address @ example.com>
 * @version   1.6        (current version number of program)
 * @since     1.5        (the version of the package this class was first added to)
 */

For more information visit:

http://en.wikipedia.org/wiki/Javadoc

javadoc: @version and @since

Community
  • 1
  • 1
Ankur Lathi
  • 7,636
  • 5
  • 37
  • 49
3

The tag @since is not used to specify date rather it is used to provide information about the last version information

/**    
* @since 1.7
*/
Shamim Ahmmed
  • 8,265
  • 6
  • 25
  • 36
2

@since 1.1

since is followed by a number which indicates some sort of version ID. Any format would do but N.N format is preferred

Lai
  • 472
  • 6
  • 23
2

I believe that the string for @since has no real syntax, I write mine as @since 2020.09.22 which appears to be either a version or a date.

B. Stackhouse
  • 477
  • 5
  • 15
1

@since annotation is used to describe when the functionality first existed, it's version number.

AllTooSir
  • 48,828
  • 16
  • 130
  • 164
1

As I know @Since is use to indicate version which start some implementation.

@Since 1.0  // meaning is this method start from version 1.0 
Ruchira Gayan Ranaweera
  • 34,993
  • 17
  • 75
  • 115