diff --git a/src/main/java/nl/hsac/fitnesse/symbols/YearsFromToday.java b/src/main/java/nl/hsac/fitnesse/symbols/YearsFromToday.java new file mode 100644 index 0000000..30a3feb --- /dev/null +++ b/src/main/java/nl/hsac/fitnesse/symbols/YearsFromToday.java @@ -0,0 +1,19 @@ +package nl.hsac.fitnesse.symbols; + +import fitnesse.wikitext.parser.Today; + +import java.util.Calendar; + +/** + * Our version of !today, that allows us to specify years instead of days. + * Usage: !yearsFromToday [(format)] [+|-increment] + */ +public class YearsFromToday extends Today { + public YearsFromToday() { + super("YearsFromToday", "!yearsFromToday", Calendar.YEAR); + } + + public YearsFromToday(String symbolName, String symbolText) { + super(symbolName, symbolText, Calendar.YEAR); + } +}