All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.blazebit.text.TimeZoneFormat Maven / Gradle / Ivy

/*
 * Copyright 2011 Blazebit
 */
package com.blazebit.text;

import java.util.TimeZone;

/**
 * @author Christian Beikov
 * @since 0.1.2
 */
public class TimeZoneFormat extends AbstractFormat {
    private static final long serialVersionUID = 1L;

    public TimeZoneFormat() {
        super(TimeZone.class);
    }

    public TimeZone parse(String value, ParserContext context) {
        return TimeZone.getTimeZone(value);
    }

    @Override
    public String format(TimeZone object, ParserContext context) {
        return object.getID();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy