本文整理汇总了Java中net.fortuna.ical4j.model.property.DateProperty.getDate方法的典型用法代码示例。如果您正苦于以下问题:Java DateProperty.getDate方法的具体用法?Java DateProperty.getDate怎么用?Java DateProperty.getDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.fortuna.ical4j.model.property.DateProperty
的用法示例。
在下文中一共展示了DateProperty.getDate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: evaluate
import net.fortuna.ical4j.model.property.DateProperty; //导入方法依赖的package包/类
/**
* Evaluates property.
* @param property The proeprty.
* @param filter The time range filter.
* @return The result.
*/
private boolean evaluate(Property property, TimeRangeFilter filter) {
if(!(property instanceof DateProperty) ) {
return false;
}
DateProperty dateProp = (DateProperty) property;
Date date = dateProp.getDate();
return date.before(filter.getPeriod().getEnd()) &&
date.after(filter.getPeriod().getStart()) ||
date.equals(filter.getPeriod().getStart()) ;
}
示例2: componentToUTC
import net.fortuna.ical4j.model.property.DateProperty; //导入方法依赖的package包/类
/**
* @param comp The component.
*/
private void componentToUTC(Component comp) {
// Do to each top-level property
for (Property prop : (List<Property>) comp.getProperties()) {
if (prop instanceof DateProperty) {
DateProperty dprop = (DateProperty) prop;
Date date = dprop.getDate();
if (date instanceof DateTime &&
(((DateTime) date).getTimeZone() != null)) {
dprop.setUtc(true);
}
}
}
// Do to each embedded component
ComponentList subcomps = null;
if (comp instanceof VEvent) {
subcomps = ((VEvent)comp).getAlarms();
}
else if (comp instanceof VToDo) {
subcomps = ((VToDo)comp).getAlarms();
}
if (subcomps != null) {
for (Component subcomp : (List<Component>) subcomps) {
componentToUTC(subcomp);
}
}
}
示例3: componentToUTC
import net.fortuna.ical4j.model.property.DateProperty; //导入方法依赖的package包/类
/**
* @param comp The component.
*/
private void componentToUTC(Component comp) {
// Do to each top-level property
for (Property prop : (List<Property>) comp.getProperties()) {
if (prop instanceof DateProperty) {
DateProperty dprop = (DateProperty) prop;
Date date = dprop.getDate();
if (date instanceof DateTime &&
(((DateTime) date).getTimeZone() != null)) {
dprop.setUtc(true);
}
}
}
// Do to each embedded component
ComponentList<? extends CalendarComponent> subcomps = null;
if (comp instanceof VEvent) {
subcomps = ((VEvent) comp).getAlarms() ;
}
else if (comp instanceof VToDo) {
subcomps = ((VToDo)comp).getAlarms();
}
if (subcomps != null) {
for (CalendarComponent subcomp : subcomps) {
componentToUTC(subcomp);
}
}
}
示例4: toDate
import net.fortuna.ical4j.model.property.DateProperty; //导入方法依赖的package包/类
@Converter
public static Date toDate(DateProperty property) {
return property.getDate();
}