Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.goda.chronic.tags;
 
 import java.util.List;
 
 
 
 public class ScalarMonth extends Scalar {
    public static final Scanner SCANNER = new Scanner(){
        public List<Tokenscan(List<TokentokensOptions options) {
            return ScalarMonth.scan(tokensoptions);
        }
    };
    private static final String MONTH_PATTERN = "^\\d\\d?$";
    public ScalarMonth(Double type) {
        super(type);
    }
    public static ScalarMonth scan(Token tokenToken postTokenOptions options) {
        if (token.getWord()
                                         .matches(.)) {
            int scalarValue = Integer.parseInt(token.getWord());
            if (!((scalarValue > 12) || ((postToken != null) && ..contains(postToken.getWord())))) {
                return new ScalarMonth(Double.valueOf(scalarValue));
            }
        }
        return null;
    }
    @Override
    public String toString() {
        return super.toString() + "-month-" + getType();
    }
New to GrepCode? Check out our FAQ X