/* @flow */ import React from 'react' import classnames from 'classnames' import { globalProps } from '../utilities/globalProps' import { buildCss } from '../utilities/props' import DateTime from '../pb_kit/dateTime' import Body from '../pb_body/_body' import Caption from '../pb_caption/_caption' import Icon from '../pb_icon/_icon' type DateRangeInlineProps = { className?: string, id?: string, data?: string, align?: "left" | "center" | "vertical", size?: "sm" | "xs", dark?: boolean, icon?: boolean, startDate?: date, endDate?: date } const dateTimestamp = (dateValue, includeYear) => { const date = new DateTime({ value: dateValue }) if (includeYear) { return `${date.toMonth()} ${date.toDay()}, ${date.toYear()}` } else { return `${date.toMonth()} ${date.toDay()}` } } const dateTimeIso = (dateValue) => { const date = new DateTime({ value: dateValue }) return date.toIso() } const DateRangeInline = (props: DateRangeInlineProps) => { const { icon = false, dark = false, size = 'sm', align = 'left', startDate, endDate, className, } = props const iconContent = () => { return ( ) } const dateInCurrentYear = () => { const currentDate = new Date() return startDate.getFullYear() == endDate.getFullYear() && startDate.getFullYear() == currentDate.getFullYear() } const dateRangeClasses = buildCss('pb_date_range_inline_kit', align) const renderTime = (date) => { return ( ) } return (
{iconContent()} {renderTime(startDate)} {renderTime(endDate)} {iconContent()} {renderTime(startDate)} {renderTime(endDate)}
) } export default DateRangeInline