Example usage for org.joda.time YearMonth toString

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

Introduction

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

Prototype

@ToString
public String toString() 

Source Link

Document

Output the year-month in ISO8601 format (yyyy-MM).

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  ww w. ja  v  a  2s . com
        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 String toNonNullValue(YearMonth value) {
    return value.toString();
}

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

License:Apache License

@Override
public String print(YearMonth object, Locale locale) {
    return object.toString();
}