public OrgDateTime build() { OrgDateTime time = new OrgDateTime(); time.isActive = isActive; time.hasTime = hasTime; time.cal = new GregorianCalendar(year, month, day, hour, minute); if (hasRepeater) { time.repeater = repeater; } if (delay != null) { time.delay = delay; } return time; } }
/** * Creates instance from the given string * * @param str Org timestamp such as {@code <2014-05-26> or [2014-05-26 Mon 09:15]} * * @return instance if the provided string is not empty */ public static OrgDateTime parse(String str) { if (str == null) { throw new IllegalArgumentException("OrgDateTime cannot be created from null string"); } if (str.length() == 0) { throw new IllegalArgumentException("OrgDateTime cannot be created from null string"); } OrgDateTime time = new OrgDateTime(); time.string = str; return time; }
public static OrgDateTime parseOrNull(String str) { if (OrgStringUtils.isEmpty(str)) { return null; } OrgDateTime time = new OrgDateTime(); time.string = str; return time; }
closed = new OrgRange(new OrgDateTime(false)); closed = new OrgRange(new OrgDateTime(false));