<%= pb_content_tag(:div, **combined_html_options) do %> <% if object.unstyled %> <% if object.show_icon %>
<%= pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true }) %>
<% end %> <% if object.show_day_of_week %>
<%= object.day_of_week %>
<% end %> <%# if not current year %> <% if object.year.to_s == DateTime.now.year.to_s %> <%= "#{object.month} #{object.day}" %> <%# if is current year %> <% else %> <%= "#{object.month} #{object.day}, #{object.year}" %> <% end %> <% elsif object.size == "md" || object.size == "lg" %> <% if object.show_icon %> <%= pb_rails("body", props: { color: "light", tag: "div", }) do %> <%= pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true }) %> <% end %> <% end %> <% if object.show_day_of_week %> <%= pb_rails("title", props: { tag: "div", text: object.day_of_week, size: 4 }) %> <%= pb_rails("body", props: { text: "•", color: "light", tag: "div", }) %> <% end %> <%# if not current year %> <% if object.year.to_s == DateTime.now.year.to_s %> <%= pb_rails("title", props: { tag: "div", text: "#{object.month} #{object.day}", size: 4 }) %> <%# if is current year %> <% else %> <%= pb_rails("title", props: { tag: "div", text: "#{object.month} #{object.day}, #{object.year}", size: 4 }) %> <% end %> <% else %> <% if object.show_icon %> <%= pb_rails("caption", props: { tag: "div", }) do %> <%= pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true, size: "sm" }) %> <% end %> <% end %> <% if object.show_day_of_week %> <%= pb_rails("caption", props: { tag: "div", text: object.day_of_week }) %> <%= pb_rails("caption", props: { text: "•", color: "light", tag: "div", }) %> <% end %> <%# if not current year %> <% if object.year.to_s == DateTime.now.year.to_s %> <%= pb_rails("caption", props: { tag: "span", text: "#{object.month} #{object.day}" }) %> <%# if is current year %> <% else %> <%= pb_rails("caption", props: { tag: "span", text: "#{object.month} #{object.day}, #{object.year}" }) %> <% end %> <% end %> <% end %>