2 * This program is free software. It comes without any warranty, to
3 * the extent permitted by applicable law. You can redistribute it
4 * and/or modify it under the terms of the Do What The Fuck You Want
5 * To Public License, Version 2, as published by Sam Hocevar. See
6 * http://www.wtfpl.net/ for more details.
8 package com
.github
.sebhoss
.time
;
10 import org
.joda
.time
.Months
;
12 import com
.github
.sebhoss
.common
.annotation
.CompilerWarnings
;
17 public final class FiscalYears
{
21 * The calendar month in the previous calendar year where the fiscal year begins.
22 * @return A new factory which creates appropriate {@link FiscalDate}s.
24 @SuppressWarnings(CompilerWarnings
.NULL
)
25 public static FiscalYearFactory
earlyFiscalYear(final int startMonth
) {
26 return new FiscalYearFactory(Months
.months(startMonth
), new EarlyFiscalYearCalculator(startMonth
));
31 * The calendar month in the previous calendar year where the fiscal year begins.
32 * @return A new factory which creates appropriate {@link FiscalDate}s.
34 public static FiscalYearFactory
earlyFiscalYear(final Months startMonth
) {
35 return new FiscalYearFactory(startMonth
, new EarlyFiscalYearCalculator(startMonth
.getMonths()));
40 * The calendar month in the current calendar year where the fiscal year begins.
41 * @return A new factory which creates appropriate {@link FiscalDate}s.
43 @SuppressWarnings(CompilerWarnings
.NULL
)
44 public static FiscalYearFactory
lateFiscalYear(final int startMonth
) {
45 return new FiscalYearFactory(Months
.months(startMonth
), new LateFiscalYearCalculator(startMonth
));
50 * The calendar month in the current calendar year where the fiscal year begins.
51 * @return A new factory which creates appropriate {@link FiscalDate}s.
53 public static FiscalYearFactory
lateFiscalYear(final Months startMonth
) {
54 return new FiscalYearFactory(startMonth
, new LateFiscalYearCalculator(startMonth
.getMonths()));
57 private FiscalYears() {