zoukankan      html  css  js  c++  java
  • Selenium-java-获取当前时间

    1 获取当前时间 时分秒

            // 获取当前时分秒
            Calendar now = Calendar.getInstance();
            int is = now.get(Calendar.HOUR_OF_DAY);
            int isf = now.get(Calendar.MINUTE);
            int iss = now.get(Calendar.SECOND);

     2 获取当前年月日

            // 获取当前年份、月份、日期  
            Calendar cale = null;  
            cale = Calendar.getInstance();  
            int year = cale.get(Calendar.YEAR);  
            int month = cale.get(Calendar.MONTH) + 1;  
            int day = cale.get(Calendar.DATE);  
            System.out.println("Year年: " + year);  
            System.out.println("Month月: " + month);  
            System.out.println("Day日: " + day);
  • 相关阅读:
    高级选择器
    CSS的选择器
    HTML——标签
    HTML
    并发编程——协程
    并发编程——线程(二)
    并发编程——线程
    4.栈
    3.链表
    2.顺序表
  • 原文地址:https://www.cnblogs.com/hs22/p/6260024.html
Copyright © 2011-2022 走看看