Calendar Afternoon Jsp : Date Calendar « JSP « Java






Calendar Afternoon Jsp

<%@ page import="java.util.Calendar"%>
<html>
  <body>
    Good
    <%
      Calendar calendar = Calendar.getInstance();
      if (calendar.get(Calendar.AM_PM) == Calendar.AM) {
        out.print("Morning");
      } else {
        out.print("Afternoon");
      }
    %>
  </body>
</html>


           
       








CalendarAfternoonJsp.zip( 88 k)

Related examples in the same category

1.Jsp Calendar Bean
2.Jsp Call Calendar Bean
3.Format date
4.Format now
5.Using the Date Class
6.Fields of the Calendar Class