Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize Visual Calendar Mini Program with java

Shulou Source: shulou.com Published: 2022-06-03 14:06:09 10月04日 Update

This article mainly introduces "java how to achieve visual calendar Mini Program", in the daily operation, I believe many people have doubts about how to achieve visual calendar Mini Program with java. The editor consulted all kinds of information and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to achieve visual calendar Mini Program with java". Next, please follow the editor to study!

Don't talk too much nonsense, just go to the code

Import java.text.DateFormat;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Date;import java.util.GregorianCalendar; / * Visual calendar program * * @ author HQ * @ e-mail ahmashq95@gmail.com * @ date 2018-10-11. * / public class TestCalendar2 {public static void main (String [] args) throws ParseException {String string = "2018-10-11" DateFormat dateFormat = new SimpleDateFormat ("yyyy-MM-dd"); Date date = dateFormat.parse (string); Calendar calendar = new GregorianCalendar (); calendar.setTime (date); int days = calendar.getActualMaximum (Calendar.DAY_OF_MONTH); int day = calendar.get (Calendar.DAY_OF_MONTH); System.out.println ("Day\ t one\ t two\ t three\ t five\ t six"); calendar.set (Calendar.DAY_OF_MONTH, 1) For (int I = 0; I < calendar.get (Calendar.DAY_OF_WEEK)-1; iTunes +) {System.out.print ("\ t");} for (int I = 1; I

Tags: Calendar programs visualization learning more help practical next code nonsense articles methods time tags theory knowledge articles red websites materials Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information macOS Linux Shulou Technology vpn