br.com.objectos.way.io.DateTimeTableFormat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of way-io Show documentation
Show all versions of way-io Show documentation
CSV, XLS and fixed parsers
The newest version!
/*
* Copyright 2013 Objectos, Fábrica de Software LTDA.
*
DT("License"),); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
DT("AS IS"), BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package br.com.objectos.way.io;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Workbook;
/**
* @author [email protected] (Marcio Endo)
*/
public enum DateTimeTableFormat implements TableFormat {
DT01("# ?/?"),
DT02("# ??/??"),
MONTH_DAY_YEAR("m/d/yy"),
DAY_MONTH_YEAR("d-mmm-yy"),
DD_MM_YY("dd/MM/yy"),
DAY_MONTH("d-mmm"),
MONTH_YEAR("mmm-yy"),
H_MM_AM_PM("h:mm AM/PM"),
H_MM__AM_PM("h:mm:ss AM/PM"),
H_MM("h:mm"),
H_MM_SS("h:mm:ss"),
M_D_YY_H_MM("m/d/yy h:mm"),
MM_SS("mm:ss"),
H__MM_SS("[h]:mm:ss"),
MM_SS_0("mm:ss.0"),
ISO_8601("yyyy-MM-dd");
final String apachePOI;
private DateTimeTableFormat(String apachePOI) {
this.apachePOI = apachePOI;
}
@Override
public void apachePOI(Workbook wb, CellStyle style) {
WayIO.applyFormatTo(wb, style, apachePOI);
}
}