本文整理汇总了Java中org.dmfs.rfc5545.DateTime.toAllDay方法的典型用法代码示例。如果您正苦于以下问题:Java DateTime.toAllDay方法的具体用法?Java DateTime.toAllDay怎么用?Java DateTime.toAllDay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.dmfs.rfc5545.DateTime
的用法示例。
在下文中一共展示了DateTime.toAllDay方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFrom
import org.dmfs.rfc5545.DateTime; //导入方法依赖的package包/类
@Override
public DateTime getFrom(ContentValues values)
{
Long timestamp = values.getAsLong(mTimestampField);
if (timestamp == null)
{
// if the time stamp is null we return null
return null;
}
// create a new Time for the given time zone, falling back to UTC if none is given
String timezone = mTzField == null ? null : values.getAsString(mTzField);
DateTime value = new DateTime(timezone == null ? DateTime.UTC : TimeZone.getTimeZone(timezone), timestamp);
// cache mAlldayField locally
String allDayField = mAllDayField;
// set the allday flag appropriately
Integer allDayInt = allDayField == null ? null : values.getAsInteger(allDayField);
if ((allDayInt != null && allDayInt != 0) || (allDayField == null && mAllDayDefault))
{
value = value.toAllDay();
}
return value;
}
示例2: getFrom
import org.dmfs.rfc5545.DateTime; //导入方法依赖的package包/类
@Override
public DateTime getFrom(ContentValues values)
{
Long timestamp = values.getAsLong(mTimestampField);
if (timestamp == null)
{
// if the time stamp is null we return null
return null;
}
// create a new Time for the given time zone, falling back to UTC if none is given
String timezone = mTzField == null ? null : values.getAsString(mTzField);
DateTime value = new DateTime(timezone == null ? DateTime.UTC : TimeZone.getTimeZone(timezone), timestamp);
// cache mAlldayField locally
String allDayField = mAllDayField;
// set the allday flag appropriately
Integer allDayInt = allDayField == null ? null : values.getAsInteger(allDayField);
if ((allDayInt != null && allDayInt != 0) || (allDayField == null && mAllDayDefault))
{
value = value.toAllDay();
}
return value;
}
示例3: iterator
import org.dmfs.rfc5545.DateTime; //导入方法依赖的package包/类
/**
* Get a new {@link RuleIterator} that iterates all instances of this rule. <p> <strong>Note:</strong> If the rule contains an UNTIL part with a floating
* value, you have to provide <code>null</code> as the timezone. </p>
*
* @param start
* The time of the first instance in milliseconds since the epoch.
* @param timezone
* The {@link TimeZone} of the first instance or <code>null</code> for floating times.
*
* @return A {@link RecurrenceRuleIterator}.
*/
public RecurrenceRuleIterator iterator(long start, TimeZone timezone)
{
// TODO: avoid creating a temporary DATETIME instance.
DateTime dt = new DateTime(mCalendarMetrics, timezone, start);
DateTime until = getUntil();
if (until != null && until.isAllDay())
{
dt = dt.toAllDay();
}
return iterator(dt);
}