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

net.fortuna.ical4j.transform.property.DatePropertyRule Maven / Gradle / Ivy

There is a newer version: 4.0.8
Show newest version
package net.fortuna.ical4j.transform.property;

import net.fortuna.ical4j.model.Parameter;
import net.fortuna.ical4j.model.property.DateProperty;

/**
 * 
 * @author daniel grigore
 * @author corneliu dobrota
 */
public class DatePropertyRule implements Rfc5545PropertyRule {

    @Override
    public void applyTo(DateProperty element) {
        TzHelper.correctTzParameterFrom(element);
        if (!element.isUtc() || !element.getParameter(Parameter.TZID).isPresent()) {
            return;
        }
        element.getParameters().removeIf(p -> p.getName().equals(Parameter.TZID));
    }

    @Override
    public Class getSupportedType() {
        return DateProperty.class;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy