Verified Owner
Top Description Constructors Methods
org.jabref.logic.formatter.bibtexfields

public Class NormalizeDateFormatter

extends Formatter
Class Inheritance
Imports
java.util.Optional, org.jabref.logic.formatter.Formatter, org.jabref.logic.l10n.Localization, org.jabref.model.entry.Date, org.jspecify.annotations.NonNull

This class transforms date to the format yyyy-mm-dd or yyyy-mm..

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
format(@NonNull String value)

Format date string to yyyy-mm-dd or yyyy-mm.

public String
getDescription()

Implements abstract org.jabref.logic.formatter.Formatter.getDescription.

Returns a description of the formatter.

public String
getExampleInput()

Implements abstract org.jabref.logic.formatter.Formatter.getExampleInput.

Returns an example input string of the formatter.

public String
getKey()

Implements abstract org.jabref.logic.formatter.Formatter.getKey.

Returns a unique key for the formatter that can be used for its identification

public String
getName()

Implements abstract org.jabref.logic.formatter.Formatter.getName.

Returns a human readable name of the formatter usable for e.g. in the GUI

Inherited from org.jabref.logic.formatter.Formatter:
equalsformathashCode

Constructor Detail

NormalizeDateFormatterback to summary
public NormalizeDateFormatter()

Method Detail

formatback to summary
public String format(@NonNull String value)

Format date string to yyyy-mm-dd or yyyy-mm. Keeps the existing String if it does not match one of the following formats: "M/y" (covers 9/15, 9/2015, and 09/2015) "MMMM (dd), yyyy" (covers September 1, 2015 and September, 2015) "yyyy-MM-dd" (covers 2009-1-15) "d.M.uuuu" (covers 15.1.2015)

Annotations
@Override
getDescriptionback to summary
public String getDescription()

Implements abstract org.jabref.logic.formatter.Formatter.getDescription.

Doc from org.jabref.logic.formatter.Formatter.getDescription.

Returns a description of the formatter.

Annotations
@Override
getExampleInputback to summary
public String getExampleInput()

Implements abstract org.jabref.logic.formatter.Formatter.getExampleInput.

Doc from org.jabref.logic.formatter.Formatter.getExampleInput.

Returns an example input string of the formatter. This example is used as input to the formatter to demonstrate its functionality

Annotations
@Override
getKeyback to summary
public String getKey()

Implements abstract org.jabref.logic.formatter.Formatter.getKey.

Doc from org.jabref.logic.formatter.Formatter.getKey.

Returns a unique key for the formatter that can be used for its identification

Annotations
@Override
getNameback to summary
public String getName()

Implements abstract org.jabref.logic.formatter.Formatter.getName.

Doc from org.jabref.logic.formatter.Formatter.getName.

Returns a human readable name of the formatter usable for e.g. in the GUI

Annotations
@Override