本文整理汇总了Java中net.fortuna.ical4j.model.property.DateProperty类的典型用法代码示例。如果您正苦于以下问题:Java DateProperty类的具体用法?Java DateProperty怎么用?Java DateProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DateProperty类属于net.fortuna.ical4j.model.property包,在下文中一共展示了DateProperty类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setDatePropertyValue
import net.fortuna.ical4j.model.property.DateProperty; //导入依赖的package包/类
protected void setDatePropertyValue(DateProperty prop,
Date date) {
if (prop == null) {
return;
}
Value value = (Value)
prop.getParameters().getParameter(Parameter.VALUE);
if (value != null) {
prop.getParameters().remove(value);
}
// Add VALUE=DATE for Date values, otherwise
// leave out VALUE=DATE-TIME because it is redundant
if(! (date instanceof DateTime)) {
prop.getParameters().add(Value.DATE);
}
}
开发者ID:1and1,项目名称:cosmo,代码行数:18,代码来源:HibBaseEventStamp.java
示例2: setDatePropertyValue
import net.fortuna.ical4j.model.property.DateProperty; //导入依赖的package包/类
/**
* Sets date property value
* @param prop The date property.
* @param date The date.
*/
protected void setDatePropertyValue(DateProperty prop, Date date) {
if (prop == null) {
return;
}
Value value = (Value) prop.getParameters()
.getParameter(Parameter.VALUE);
if (value != null) {
prop.getParameters().remove(value);
}
// Add VALUE=DATE for Date values, otherwise
// leave out VALUE=DATE-TIME because it is redundant
if (!(date instanceof DateTime)) {
prop.getParameters().add(Value.DATE);
}
}
开发者ID:1and1,项目名称:cosmo,代码行数:22,代码来源:MockBaseEventStamp.java
示例3: 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()) ;
}
开发者ID:ksokol,项目名称:carldav,代码行数:19,代码来源:CalendarFilterEvaluater.java
示例4: 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);
}
}
}
开发者ID:ksokol,项目名称:carldav,代码行数:32,代码来源:OutputFilter.java
示例5: 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);
}
}
}
开发者ID:1and1,项目名称:cosmo,代码行数:32,代码来源:OutputFilter.java
示例6: fixDateTimeProperties
import net.fortuna.ical4j.model.property.DateProperty; //导入依赖的package包/类
private void fixDateTimeProperties(Component component) {
PropertyList<Property> props = component.getProperties();
for(Property prop : props) {
if(prop instanceof DateProperty || prop instanceof DateListProperty) {
Value v = (Value) prop.getParameter(Parameter.VALUE);
if(Value.DATE_TIME.equals(v)) {
prop.getParameters().remove(v);
}
}
}
}
开发者ID:1and1,项目名称:cosmo,代码行数:12,代码来源:ICal3ClientFilter.java
示例7: toDate
import net.fortuna.ical4j.model.property.DateProperty; //导入依赖的package包/类
@Converter
public static Date toDate(DateProperty property) {
return property.getDate();
}
开发者ID:HydAu,项目名称:Camel,代码行数:5,代码来源:ICalConverter.java
示例8: JsonDatePropertyAdapter
import net.fortuna.ical4j.model.property.DateProperty; //导入依赖的package包/类
/**
* Constructor used when generating JSON
*
* @param dateProperty
*/
public JsonDatePropertyAdapter(DateProperty dateProperty) {
_dateProperty = dateProperty;
}
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:9,代码来源:JsonDatePropertyAdapter.java
注:本文中的net.fortuna.ical4j.model.property.DateProperty类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论