Example usage for org.joda.time YearMonth parse

List of usage examples for org.joda.time YearMonth parse

Introduction

In this page you can find the example usage for org.joda.time YearMonth parse.

Prototype

@FromString
public static YearMonth parse(String str) 

Source Link

Document

Parses a YearMonth from the specified string.

Usage

From source file:google.registry.model.translators.YearMonthTranslatorFactory.java

License:Open Source License

@Override
protected SimpleTranslator<YearMonth, String> createTranslator() {
    return new SimpleTranslator<YearMonth, String>() {
        @Override//from www  . jav a 2 s  .c  o  m
        public YearMonth loadValue(String datastoreValue) {
            return YearMonth.parse(datastoreValue);
        }

        @Override
        public String saveValue(YearMonth pojoValue) {
            return pojoValue.toString();
        }
    };
}

From source file:org.jadira.usertype.dateandtime.joda.columnmapper.StringColumnYearMonthMapper.java

License:Apache License

@Override
public YearMonth fromNonNullValue(String s) {
    return YearMonth.parse(s);
}

From source file:org.springframework.format.datetime.joda.YearMonthFormatter.java

License:Apache License

@Override
public YearMonth parse(String text, Locale locale) throws ParseException {
    return YearMonth.parse(text);
}