Example usage for org.joda.time.format ISODateTimeFormat forFields

List of usage examples for org.joda.time.format ISODateTimeFormat forFields

Introduction

In this page you can find the example usage for org.joda.time.format ISODateTimeFormat forFields.

Prototype

public static DateTimeFormatter forFields(Collection<DateTimeFieldType> fields, boolean extended,
        boolean strictISO) 

Source Link

Document

Returns a formatter that outputs only those fields specified.

Usage

From source file:org.celeria.minecraft.backup.ArchivistModule.java

License:Apache License

@Provides
@Singleton/*  w  w  w  . j a  v a2 s  .  c o  m*/
public DateTimeFormatter provideDateTimeFormatter() {
    final List<DateTimeFieldType> fields = ImmutableList.<DateTimeFieldType>of(year(), monthOfYear(),
            dayOfMonth(), hourOfDay());
    return ISODateTimeFormat.forFields(fields, true, true);
}