Displays a local date (as it would be on a calendar, not tied to any
specific timezone)
507432
function LocalDateView(props) {
    var empty = React.createElement("time", null, "-");
    if (!props.date) {
        return empty;
    }
    var isoDate = props.date.substring(0, 10);
    if (!isoDate) {
        return empty;
    }
    try {
        var formattedDate = format_1.format(isoDate);
        return React.createElement("time", { dateTime: isoDate }, formattedDate);
    }
    catch (e) {
        dev_1.warn("Provided date was not in ISO8061 format (yyyy-MM-dd): " + props.date);
        return empty;
    }
}
233234
public static Date localDateToDate(LocalDate localDate) {
        ZoneId zone = ZoneId.systemDefault();
        Instant instant = localDate.atStartOfDay().atZone(zone).toInstant();
        return Date.from(instant);
    }
305711
def _getFromTime(self, atDate=None):
        
        return getLocalTime(self.except_date, self.time_from, self.tz)
832081
public static final <T extends Calendar> Function<T, LocalTime> calendarToLocalTime(DateTimeZone dateTimeZone) {
		return new CalendarToLocalTime<T>(dateTimeZone);
	}
53520
def handle_time(msg):
    """"""
    return msg.copy(ack=0, payload=calendar.timegm(time.localtime()))
725224
def mktime_tz(data):
    """"""
    if data[9] is None:
        # No zone info, so localtime is better assumption than GMT
        return time.mktime(data[:8] + (-1,))
    else:
        t = calendar.timegm(data)
        return t - data[9]
1157161
def postponed_from(self):
        
        fromDate = getLocalDate(self.except_date, self.time_from, self.tz)
        return dateFormat(fromDate)
866199
public static final <T extends Calendar> Function<T, LocalDate> calendarToLocalDate(DateTimeZone dateTimeZone) {
		return new CalendarToLocalDate<T>(dateTimeZone);
	}
1217699
def _getLocalWhen(self, date_from, date_to=None):
        
        dateFrom, timeFrom = getLocalDateAndTime(date_from, self.time_from,
                                                 self.tz, dt.time.min)

        if date_to is not None:
            dateTo, timeTo = getLocalDateAndTime(date_to, self.time_to, self.tz)
        else:
            if self.time_to is not None:
                dateTo, timeTo = getLocalDateAndTime(date_from, self.time_to, self.tz)
            else:
                dateTo = dateFrom
                timeTo = None

        if dateFrom == dateTo:
            retval = _("{date} {atTime}").format(date=dateFormat(dateFrom),
                        atTime=timeFormat(timeFrom, timeTo, gettext("at ")))
        else:
            retval = _("{date} {atTime}").format(date=dateFormat(dateFrom),
                        atTime=timeFormat(timeFrom, prefix=gettext("at ")))
            retval = _("{dateTimeFrom} to {dateTo} {atTimeTo}").format(
                        dateTimeFrom=retval.strip(),
                        dateTo=dateFormat(dateTo),
                        atTimeTo=timeFormat(timeTo, prefix=gettext("at ")))
        return retval.strip()
1070103
public static LocalDate dateToLocalDate(Date date) {
        Instant instant = date.toInstant();
        ZoneId zone = ZoneId.systemDefault();
        return LocalDateTime.ofInstant(instant, zone).toLocalDate();
    }
1149188
private static Calendar dateToCalendar(Date date) {
		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		return cal;
	}
445504
private static LocalDate parseLocalDate(final String input) {
        if (input.contains("--") || input.contains("*")) {
            return null;
        }
        return LocalDate.parse(input);
    }
681168
public static LocalDateTime toLocalDateTime(Date date)
	{
		if(date == null)
			return null;
		
		return date.toInstant().atZone(ZoneId.systemDefault())
		.toLocalDateTime();
	}
44011
public Calendar toCalendar(T dateTime, Locale locale) {
    return toDateTime(dateTime).toCalendar(locale);
  }
967296
public static Calendar toCalendar(final LocalDate self) {
        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.DATE, self.getDayOfMonth());
        cal.set(Calendar.MONTH, self.getMonthValue() - 1);
        cal.set(Calendar.YEAR, self.getYear());
        clearTimeCommon(cal);
        return cal;
    }
1053361
public static Date toDate(LocalDate date)
	{
		if(date == null)
			return null;
		
		return  java.util.Date
	      .from(date.atStartOfDay(ZoneId.systemDefault())
	      .toInstant());
	}
1065130
public static LocalDate toLocalDate(Date time)
	{
		return time.toInstant().atZone(ZoneId.systemDefault())
		.toLocalDate();
	}