META-INF.resources.commerce_order.requested_delivery_date.jsp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.commerce.order.content.web
Show all versions of com.liferay.commerce.order.content.web
Liferay Commerce Order Content Web
<%--
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
--%>
<%@ include file="/init.jsp" %>
<%
CommerceOrder commerceOrder = commerceOrderContentDisplayContext.getCommerceOrder();
Date requestedDeliveryDate = commerceOrder.getRequestedDeliveryDate();
%>
<%
int requestedDeliveryDay = 0;
int requestedDeliveryMonth = -1;
int requestedDeliveryYear = 0;
if (requestedDeliveryDate != null) {
Calendar calendar = CalendarFactoryUtil.getCalendar(requestedDeliveryDate.getTime());
requestedDeliveryDay = calendar.get(Calendar.DAY_OF_MONTH);
requestedDeliveryMonth = calendar.get(Calendar.MONTH);
requestedDeliveryYear = calendar.get(Calendar.YEAR);
}
%>